This commit is contained in:
2024-11-05 15:03:37 +05:30
parent bd77a5be39
commit 4cd239114e
6 changed files with 20 additions and 13 deletions

View File

@@ -17,11 +17,7 @@ const DefaultLayout = ({ children }) => {
return (
<Box
// bg={"red"}
// bg={localStorage?.getItem("light") === true ?"white" : "black"}
>
<Box>
<NavBar />
<SlideFade
key={location.pathname}

View File

@@ -0,0 +1,3 @@
<svg width="20" height="10" viewBox="0 0 20 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15.3512 1.48007C13.5269 3.06437 11.747 4.27344 10.8793 4.4819C10.3676 4.60698 10.3454 4.56528 10.4121 3.79398C10.4566 3.27283 10.3454 2.66829 10.1007 2.18883C8.89926 -0.208461 5.58428 0.250153 2.42505 3.23114C0.800933 4.77374 0 6.12874 0 7.3795C0 8.27588 0.0889926 8.48434 0.867678 9.19311C1.89109 10.152 2.71427 10.2563 3.58195 9.5058C6.38522 7.06681 8.72127 5.41997 9.41096 5.41997C9.49996 5.41997 9.5667 5.83689 9.5667 6.35804C9.5667 7.98403 10.5901 9.2348 12.1697 9.5058C13.2599 9.69341 15.8852 8.44265 17.4648 6.96258C19.8231 4.77374 20.5573 2.79337 19.5784 1.3133C19.1334 0.604535 18.11 0 17.4203 0C17.1978 0.0208464 16.2634 0.68792 15.3512 1.48007Z" fill="#230A79"/>
</svg>

After

Width:  |  Height:  |  Size: 787 B

View File

@@ -27,6 +27,7 @@ import {
useGetTransCountQuery,
} from "../../Services/api.service";
import rbtLogoOutline from "../../assets/images/rubix-filled.svg";
import rbtLogoDark from "../../assets/images/RBTLogo.svg";
import { HiOutlineRefresh } from "react-icons/hi";
import FullScreenLoaader from "../FullScreenLoaader/FullScreenLoaader";
@@ -572,7 +573,7 @@ const LatestTransactions = () => {
alignItems={"center"}
color={colorMode === "light" ? "#230A79" : "#B09AFF"}
>
<Image w={4} src={rbtLogoOutline} />
<Image w={4} src={colorMode === "light" ? rbtLogoDark :rbtLogoOutline} />
{amount}
</Text>
</Box>}

View File

@@ -43,9 +43,9 @@ const Home = () => {
const [isSwitchOn, setIsSwitchOn] = useState(true);
const { colorMode, toggleColorMode } = useColorMode();
const [ linkVisible, setLinkVisible ] = useState(false)
const [ searchTerm, setSearchTerm] = useState("")
const [ searchTerm, setSearchTerm] = useState(null)
const navigate = useNavigate()
const [ shortURL, setShortURL ] = useState(null)
const [ shortURL, setShortURL ] = useState("Invalid hash...")
const [ isLoading, setIsLoading ] = useState(false)
const [ isCopy, setIsCopy ] = useState(false)
const toast = useToast()
@@ -124,8 +124,9 @@ const toast = useToast()
const handleGenrateShortURL = async () => {
setLinkVisible(true)
setIsLoading(true)
try {
const response = await fetch('https://rexplorerapi.azurewebsites.net/api/ShortUrl/create', {
const response = await fetch(`${import.meta.env.VITE_BASE_URL}ShortUrl/create`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@@ -164,6 +165,7 @@ const toast = useToast()
<Container maxW="3xl" position={"relative"}>
<Box w={'100%'} display={"flex"} alignItems={"center"} flexDirection={'column'} gap={6}>
<InputGroup
width={"100%"}
boxShadow={"sm"}
size="sm"
@@ -204,7 +206,9 @@ const toast = useToast()
bg={colorMode === "light" ? "#4023A6" : "#565252"}
_hover={{
opacity:0.9,
bg: colorMode !== "light" && "#333248"
bg: colorMode !== "light" && "#333248",
cursor:!searchTerm?'not-allowed':"pointer"
}}
_focus={{ opacity:1, outline:'none', bg:colorMode === "light" ? "#4023A6" : "#565252" }}
@@ -212,6 +216,9 @@ const toast = useToast()
color={'#fff'}
isLoading={isLoading}
onClick={handleGenrateShortURL}
// isDisabled={!searchTerm}
pointerEvents={!searchTerm?'none':"auto"}
>
Generate short url
</Button>
@@ -228,7 +235,7 @@ const toast = useToast()
bg={colorMode === "light" ? "#DEDBEB" : "#393939"}
color={colorMode === "light" ? "#230A79" : "#fff"}
cursor={'pointer'}
// onClick={()=>navigate(`/transaction/${searchTerm}`)}
onClick={()=>navigate(`/transaction/${searchTerm}`)}
border={`1px solid ${
colorMode === "light" ? "#230A79" : "#565252"
}`}

View File

@@ -104,7 +104,7 @@ const SubnetInner = () => {
setIsLoading(true)
const fullUrl = window.location.href;
try {
const response = await fetch('https://rexplorerapi.azurewebsites.net/api/ShortUrl/create', {
const response = await fetch(`${import.meta.env.VITE_BASE_URL}ShortUrl/create`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',

View File

@@ -106,7 +106,7 @@ const TransactionDetails = () => {
setIsLoading(true)
const fullUrl = window.location.href;
try {
const response = await fetch('https://rexplorerapi.azurewebsites.net/api/ShortUrl/create', {
const response = await fetch(`${import.meta.env.VITE_BASE_URL}ShortUrl/create`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',