diff --git a/src/App.tsx b/src/App.tsx index 8c40b9d..bce69a8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,7 +3,7 @@ import Navbar from "src/Components/Navbar/Navbar"; import ModalsContainer from "src/Components/Modals/ModalsContainer/ModalsContainer"; import { useAppSelector } from './utils/hooks'; import { Wallet_Service } from "./services"; -import { Route, Routes } from "react-router-dom"; +import { Navigate, Route, Routes } from "react-router-dom"; import { useWrapperSetup } from "./utils/Wrapper"; import LoadingPage from "./Components/LoadingPage/LoadingPage"; @@ -45,13 +45,18 @@ function App() { }> - } /> - } /> + } /> + } /> + } /> + } /> } /> + } /> + } /> - } /> + + } /> diff --git a/src/Components/Navbar/CategoriesList/CategoriesList.tsx b/src/Components/Navbar/CategoriesList/CategoriesList.tsx index 92979d4..b682f6f 100644 --- a/src/Components/Navbar/CategoriesList/CategoriesList.tsx +++ b/src/Components/Navbar/CategoriesList/CategoriesList.tsx @@ -33,13 +33,14 @@ export default function CategoriesList({ classes = {}, onClick }: Props) { <> {data?.allCategories.map(category => { - onClick?.(category.id) - navigate(`/category/${category.id}`) - }} key={category.id} - href={`/category/${category.id}`} + className={`w-full !p-16 text-body4 font-semibold hover:bg-gray-100 !rounded-8 flex w-items-center ${classes.item}`} + href={`/products/category/${category.id}`} + onClick={(e) => { + e.syntheticEvent.preventDefault(); + onClick?.(category.id) + navigate(`/products/category/${category.id}`) + }} > {category.icon} {category.title} {numberFormatter(category.votes_sum)} diff --git a/src/Components/Navbar/NavDesktop.tsx b/src/Components/Navbar/NavDesktop.tsx index b69060a..fa29a95 100644 --- a/src/Components/Navbar/NavDesktop.tsx +++ b/src/Components/Navbar/NavDesktop.tsx @@ -1,7 +1,7 @@ import { BsSearch } from "react-icons/bs"; import { motion } from "framer-motion"; -import { useAppDispatch, useAppSelector } from "src/utils/hooks"; +import { useAppDispatch, useAppSelector, useCurrentSection } from "src/utils/hooks"; import { openModal } from "src/redux/features/modals.slice"; import Button from "../Button/Button"; import ASSETS from "src/assets"; @@ -46,27 +46,11 @@ export default function NavDesktop() { }; - - const onConnectWallet = () => { - dispatch( - openModal({ - Modal: "Login_ScanningWalletCard", - }) - ); - }; - - const onWithdraw = () => { - dispatch( - openModal({ - Modal: "Claim_FundWithdrawCard", - }) - ); - }; - + const currentSection = useCurrentSection(); const navigate = useNavigate() - return (