From 4cd239114ea2dd3a1a3444c4c4ea5495754ebda2 Mon Sep 17 00:00:00 2001 From: "Siddhesh.More" Date: Tue, 5 Nov 2024 15:03:37 +0530 Subject: [PATCH] update --- src/Layout/DefaultLayout.jsx | 6 +----- src/assets/images/RBTLogo.svg | 3 +++ .../LatestTransactions/LatestTransactions.jsx | 3 ++- src/pages/Home.jsx | 17 ++++++++++++----- src/pages/SubnetIdOverview.jsx | 2 +- src/pages/Transaction/TransactionDetails.jsx | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 src/assets/images/RBTLogo.svg diff --git a/src/Layout/DefaultLayout.jsx b/src/Layout/DefaultLayout.jsx index 4e6490f..7260328 100644 --- a/src/Layout/DefaultLayout.jsx +++ b/src/Layout/DefaultLayout.jsx @@ -17,11 +17,7 @@ const DefaultLayout = ({ children }) => { return ( - + + + diff --git a/src/components/LatestTransactions/LatestTransactions.jsx b/src/components/LatestTransactions/LatestTransactions.jsx index f46d8d1..5cbe728 100644 --- a/src/components/LatestTransactions/LatestTransactions.jsx +++ b/src/components/LatestTransactions/LatestTransactions.jsx @@ -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"} > - + {amount} } diff --git a/src/pages/Home.jsx b/src/pages/Home.jsx index 47cf7cd..0c388da 100644 --- a/src/pages/Home.jsx +++ b/src/pages/Home.jsx @@ -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() Generate short url @@ -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" }`} diff --git a/src/pages/SubnetIdOverview.jsx b/src/pages/SubnetIdOverview.jsx index 5c3e154..abd67b0 100644 --- a/src/pages/SubnetIdOverview.jsx +++ b/src/pages/SubnetIdOverview.jsx @@ -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', diff --git a/src/pages/Transaction/TransactionDetails.jsx b/src/pages/Transaction/TransactionDetails.jsx index 0af9a6f..29bb0b3 100644 --- a/src/pages/Transaction/TransactionDetails.jsx +++ b/src/pages/Transaction/TransactionDetails.jsx @@ -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',