update link

This commit is contained in:
YasinShaikh123
2024-10-07 14:42:32 +05:30
parent 6e48eb133d
commit 04d044160e
11 changed files with 167 additions and 59 deletions

View File

@@ -1,4 +1,4 @@
import { Box, Container, Grid, GridItem, HStack, Text, useColorMode } from "@chakra-ui/react";
import { Box, Container, Grid, GridItem, HStack, Text, useColorMode, useToast } from "@chakra-ui/react";
import React, { useContext } from "react";
import { MdContentCopy, MdOutlineErrorOutline } from "react-icons/md";
import Pagination from "../Pagination";
@@ -11,10 +11,11 @@ import ToastBox from "../ToastBox";
const LatestTransactions = () => {
const { colorMode} = useColorMode();
const { transactions } = useContext(GlobalStateContext);
function copyToClipboard(text) {
const { transactions } = useContext(GlobalStateContext);
const toast = useToast()
function copyToClipboard(text) {
navigator.clipboard
.writeText(text)
.then(() => {
@@ -62,19 +63,19 @@ const LatestTransactions = () => {
<GridItem p={4}>
<Box>
<Text fontSize={"sm"} mb={2} color={colorMode === "light" ? "#230A79" : "#B09AFF"}>
{transaction.description}
<Link to="/did-info"> {transaction.description}</Link>
</Text>
<HStack fontSize={"sm"} gap={4} mb={2}>
<Text color={colorMode === "light" ? "#0F0F0F" : "#E8E8E8"}>Sender :</Text>
<HStack color={colorMode === "light" ? "#230A79" : "#B09AFF"} textDecoration={"underline"}>
<Link style={{fontWeight:"inherit"}}>{transaction.sender}</Link>
<Link to="/transaction" style={{fontWeight:"inherit"}}>{transaction.sender}</Link>
<Text as={"span"} ml={5} cursor={"pointer"}><MdContentCopy onClick={()=> copyToClipboard(transaction.sender)} /></Text>
</HStack>
</HStack>
<HStack fontSize={"sm"} gap={4} mb={3}>
<Text color={colorMode === "light" ? "#0F0F0F" : "#E8E8E8"}>Receiver :</Text>
<HStack color={colorMode === "light" ? "#230A79" : "#B09AFF"} textDecoration={"underline"}>
<Link style={{fontWeight:"inherit"}}>{transaction.receiver}</Link>
<Link to="/transaction" style={{fontWeight:"inherit"}}>{transaction.receiver}</Link>
<Text as={"span"} ml={5} cursor={"pointer"}><MdContentCopy onClick={()=> copyToClipboard(transaction.receiver)} /></Text>
</HStack>
</HStack>
@@ -89,7 +90,7 @@ const LatestTransactions = () => {
<Text mb={2} color={colorMode === "light" ? "#7B7B7B" : "#E8E8E8"}>
Smart contract ID dd :
</Text>
<Text color={colorMode === "light" ? "#230A79" : "#B09AFF"}>{transaction.contract}</Text>
<Text color={colorMode === "light" ? "#230A79" : "#B09AFF"}><Link to="/smart-contract">{transaction.contract}</Link></Text>
</Box>
<Box>
<Text mb={2} color={colorMode === "light" ? "#7B7B7B" : "#E8E8E8"}>
@@ -113,7 +114,7 @@ const LatestTransactions = () => {
<HStack>
<Text color={colorMode === "light" ? "#7B7B7B" : "#E8E8E8"}>Transaction type :</Text>
<Text color={colorMode === "light" ? "#230A79" : "#B09AFF"}>
<Link to="/transaction" style={{fontWeight:"inherit"}}>{transaction.transactionType}</Link>
<Link style={{fontWeight:"inherit"}}>{transaction.transactionType}</Link>
</Text>
</HStack>
<HStack>

View File

@@ -73,7 +73,7 @@ const NavBar = () => {
<Box display={"flex"} alignItems={"center"} gap={7}>
<NavLink
to="/mainNet"
to="/main-net"
style={({ isActive }) => ({
fontSize: "14px",
fontWeight: "400",

View File

@@ -1,23 +1,18 @@
import { Box, Text } from "@chakra-ui/react";
import { Box, Text, useColorMode } from "@chakra-ui/react";
import React from "react";
import { FaCheck } from "react-icons/fa";
import { IoWarningOutline } from "react-icons/io5";
const ToastBox = ({ message, status }) => {
return (
<Box
className="web-text-large d-flex gap-2 align-items-center"
p={3}
color={status === "error" ? "red.500" : status === "warn" ? "blue.500" : "green.500"}
bg={"#fff"}
boxShadow={'md'}
rounded={'md'}
>
{status === "error" || status === "warn" ? <IoWarningOutline /> : <FaCheck /> }
<Text as={"span"}>{message}</Text>
</Box>
const { colorMode} = useColorMode();
return (
<Box rounded={5} w={250} bg={colorMode === "light" ? "#dedaeb" : "linear-gradient(126.97deg, rgba(6, 11, 38, 0.74) 28.26%, rgba(26, 31, 55, 1.5) 91.2%)"} color={colorMode === "light" ? "#230A79" : "#fff"} p={3} display={"flex"} alignItems={"center"}>
{status === "error" || status === "warn" ? <IoWarningOutline /> : <FaCheck /> }
<Text fontSize={"sm"} as={"span"} ml={2}>{message}</Text>
</Box>
);
};