From c7288002ca36cab1235b9c57e1e34785b8c3d623 Mon Sep 17 00:00:00 2001 From: Ignacio Date: Thu, 28 Dec 2023 20:49:38 +0800 Subject: [PATCH 1/9] fix: hydration issues --- .eslintrc.cjs | 3 +- src/components/background.module.scss | 29 ++ src/components/background.tsx | 35 +- .../footer/components/social_media/index.tsx | 1 + src/components/footer/index.tsx | 8 +- src/components/header-card/index.module.scss | 10 +- .../product-panel/index.module.scss | 17 + src/components/product-panel/index.tsx | 27 +- src/components/selection-tab/index.tsx | 3 +- src/screens/products/index.module.scss | 12 + src/screens/products/index.tsx | 319 ++++++++---------- src/styles/sass.scss | 6 +- 12 files changed, 251 insertions(+), 219 deletions(-) create mode 100644 src/components/product-panel/index.module.scss diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 90da43a5..543e7480 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -52,7 +52,6 @@ module.exports = { // @TODO: These should be removed when fixed "@typescript-eslint/no-explicit-any": "off", "@next/next/no-img-element": "off", - "jsx-a11y/alt-text": "off", "react/display-name": "off", "arrow-body-style": "error", @@ -80,8 +79,10 @@ module.exports = { "always", { destructureInSignature: "always" }, ], + "react/function-component-definition": "off", "react/jsx-boolean-value": "error", + "react/jsx-curly-brace-presence": "error", "react/jsx-filename-extension": "off", "react/jsx-fragments": "error", "react/jsx-key": ["error", { warnOnDuplicates: true }], diff --git a/src/components/background.module.scss b/src/components/background.module.scss index 7bd99bd3..a5be255c 100644 --- a/src/components/background.module.scss +++ b/src/components/background.module.scss @@ -11,3 +11,32 @@ display: none; } } + +.horseWrapperDesktop { + top: 0; + right: 0; + left: 0; + height: 50vw; + position: absolute; + + @media (max-width: 550px) { + img { + display: none; + } + } +} + +.horseWrapperMobile { + height: 120vw; + left: 0; + margin-top: 100px; + position: absolute; + right: 0; + top: 0; + + @media (min-width: 550px) { + img { + display: none; + } + } +} diff --git a/src/components/background.tsx b/src/components/background.tsx index 81676ef4..b05ae9e8 100644 --- a/src/components/background.tsx +++ b/src/components/background.tsx @@ -39,49 +39,22 @@ const Background = ({ displayHorse }: { displayHorse?: boolean }) => { {displayHorse && ( <> - + Forbole Horse Logo - + Forbole Horse Logo diff --git a/src/components/footer/components/social_media/index.tsx b/src/components/footer/components/social_media/index.tsx index 7f695f75..6ee6a140 100644 --- a/src/components/footer/components/social_media/index.tsx +++ b/src/components/footer/components/social_media/index.tsx @@ -106,6 +106,7 @@ const SocialMedia = () => { { const { t } = useTranslation("common"); const wrapperStyle = { - style: { - color: itemColor, - }, + style: itemColor + ? { + color: itemColor, + } + : {}, }; return ( diff --git a/src/components/header-card/index.module.scss b/src/components/header-card/index.module.scss index 6d2f3917..f1dd244b 100644 --- a/src/components/header-card/index.module.scss +++ b/src/components/header-card/index.module.scss @@ -87,18 +87,20 @@ $card-box-shadow: } } -.image2 { +.image2 img { display: none; - @include down-laptop { + @include down-tablet { display: block; + object-fit: cover; } } -.image3 { +.image3 img { display: none; - @include up-laptop { + @include up-tablet { display: block; + object-fit: cover; } } diff --git a/src/components/product-panel/index.module.scss b/src/components/product-panel/index.module.scss new file mode 100644 index 00000000..23fe6374 --- /dev/null +++ b/src/components/product-panel/index.module.scss @@ -0,0 +1,17 @@ +@import "src/styles/sass.scss"; + +body .imgMobile { + display: none; + + @include down-tablet { + display: block; + } +} + +body .imgDesktop { + display: none; + + @include up-tablet { + display: block; + } +} diff --git a/src/components/product-panel/index.tsx b/src/components/product-panel/index.tsx index 17350edf..7d5ee8f2 100644 --- a/src/components/product-panel/index.tsx +++ b/src/components/product-panel/index.tsx @@ -1,9 +1,13 @@ import { Box, Stack, Typography, useTheme } from "@mui/material"; import { forwardRef } from "react"; +import * as styles from "./index.module.scss"; + type Props = { title?: string; - imageHref: string; + // @deprecated + imageHref?: string; + imageHrefs?: string[]; children?: React.ReactNode; index: number; value: number; @@ -11,7 +15,7 @@ type Props = { }; const productPanel = forwardRef( - ({ title, imageHref, children, index, value, imgFull }, ref) => { + ({ title, imageHref, children, index, value, imgFull, imageHrefs }, ref) => { const theme = useTheme(); // eslint-disable-next-line eqeqeq @@ -85,7 +89,24 @@ const productPanel = forwardRef( }, }} > - + {imageHrefs ? ( + <> + + + + ) : ( + + )} void; + value: number; } export const StyledTabs = styled((props: StyledTabsProps) => ( diff --git a/src/screens/products/index.module.scss b/src/screens/products/index.module.scss index 646d32cc..105f0390 100644 --- a/src/screens/products/index.module.scss +++ b/src/screens/products/index.module.scss @@ -274,3 +274,15 @@ min-width: 0; padding: 0; } + +.mobileOnly { + @include up-tablet { + display: none; + } +} + +.notMobile { + @include down-tablet { + display: none; + } +} diff --git a/src/screens/products/index.tsx b/src/screens/products/index.tsx index b8edb03d..12723f21 100644 --- a/src/screens/products/index.tsx +++ b/src/screens/products/index.tsx @@ -1,10 +1,4 @@ -import { - Container, - Stack, - Typography, - useMediaQuery, - useTheme, -} from "@mui/material"; +import { Box, Container, Stack, Typography } from "@mui/material"; import useTranslation from "next-translate/useTranslation"; import dynamic from "next/dynamic"; import { useRouter } from "next/router"; @@ -118,12 +112,6 @@ const Products = () => { [t], ); - const theme = useTheme(); - - const isMobile = useMediaQuery(theme.breakpoints.down("tablet"), { - noSsr: true, - }); - const [v1, setV1] = useState(0); const [v2, setV2] = useState(0); const topRef = useRef(null); @@ -157,18 +145,14 @@ const Products = () => { {t("why")} , + , , ]} i18nKey="bridging" @@ -201,7 +185,7 @@ const Products = () => { , + , , ]} i18nKey="safe-path" @@ -212,70 +196,67 @@ const Products = () => { direction="column" spacing={{ mobile: 1, desktop: 2 }} > - {!isMobile && ( - + } + label={t("staking")} + /> + } + label={t("analytics")} + /> + } + label={t("developer")} + /> + + + { + handleChange(e, 0); + scrollBottom(e, PanelRef1); + }} + startIcon={ + + } > - } - label={t("staking")} - /> - } - label={t("analytics")} - /> - } - label={t("developer")} - /> - - )} - {isMobile && ( - <> - { - handleChange(e, 0); - scrollBottom(e, PanelRef1); - }} - startIcon={ - - } - > - {t("staking")} - - { - handleChange(e, 1); - scrollBottom(e, PanelRef1); - }} - startIcon={ - - } - > - {t("analytics")} - - { - handleChange(e, 2); - scrollBottom(e, PanelRef1); - }} - startIcon={ - - } - > - {t("developer")} - - - )} + {t("staking")} + + { + handleChange(e, 1); + scrollBottom(e, PanelRef1); + }} + startIcon={ + + } + > + {t("analytics")} + + { + handleChange(e, 2); + scrollBottom(e, PanelRef1); + }} + startIcon={ + + } + > + {t("developer")} + + {individuals.map((item, index) => ( { , + , , ]} i18nKey="trusted" @@ -326,119 +307,111 @@ const Products = () => { direction="column" spacing={{ mobile: 1, desktop: 2 }} > - {!isMobile && ( - <> - - - } - label={t("validator-infrastructure")} - /> - - } - label={t("staking")} - /> - - } - label={t("analytics")} - /> - - - - - - - - - } - label={t("developer")} - /> - - } - label={t("enterprise-solution")} - /> - - - )} - {isMobile && ( - <> - { - handleChange2(e, 0); - scrollBottom(e, PanelRef2); - }} - startIcon={ - - } - > - {t("validator-infrastructure")} - + + } + label={t("validator-infrastructure")} + /> + } + label={t("staking")} + /> + } + label={t("analytics")} + /> + + + + + + + + } + label={t("developer")} + /> + } + label={t("enterprise-solution")} + /> + + + { + handleChange2(e, 0); + scrollBottom(e, PanelRef2); + }} + startIcon={ + + } + > + {t("validator-infrastructure")} + + { + handleChange2(e, 1); + scrollBottom(e, PanelRef2); + }} + startIcon={ + + } + > + {t("staking")} + + { + handleChange2(e, 2); + scrollBottom(e, PanelRef2); + }} + startIcon={ + + } + > + {t("analytics")} + + { - handleChange2(e, 1); + handleChange2(e, 3); scrollBottom(e, PanelRef2); }} startIcon={ - + } > - {t("staking")} + {t("developer")} { - handleChange2(e, 2); + handleChange2(e, 4); scrollBottom(e, PanelRef2); }} startIcon={ - + } > - {t("analytics")} + {t("enterprise-solution")} - - { - handleChange2(e, 3); - scrollBottom(e, PanelRef2); - }} - startIcon={ - - } - > - {t("developer")} - - { - handleChange2(e, 4); - scrollBottom(e, PanelRef2); - }} - startIcon={ - - } - > - {t("enterprise-solution")} - - - - )} + + {businesses.map((item, index) => ( Date: Thu, 28 Dec 2023 20:52:38 +0800 Subject: [PATCH 2/9] fix: add empty tags --- src/screens/Infrastructure/index.tsx | 2 + src/screens/products/index.tsx | 64 ++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/src/screens/Infrastructure/index.tsx b/src/screens/Infrastructure/index.tsx index 71048ca4..dd7b01c8 100644 --- a/src/screens/Infrastructure/index.tsx +++ b/src/screens/Infrastructure/index.tsx @@ -230,6 +230,7 @@ const Infrastructure = () => { @@ -242,6 +243,7 @@ const Infrastructure = () => { diff --git a/src/screens/products/index.tsx b/src/screens/products/index.tsx index 12723f21..d5ebb070 100644 --- a/src/screens/products/index.tsx +++ b/src/screens/products/index.tsx @@ -166,14 +166,18 @@ const Products = () => { scrollToRef(e, individualsRef)} - startIcon={} + startIcon={ + + } > {t("for-individuals")} scrollToRef(e, businessesRef)} - startIcon={} + startIcon={ + + } > {t("for-businesses")} @@ -203,15 +207,21 @@ const Products = () => { value={v1} > } + icon={ + + } label={t("staking")} /> } + icon={ + + } label={t("analytics")} /> } + icon={ + + } label={t("developer")} /> @@ -223,7 +233,7 @@ const Products = () => { scrollBottom(e, PanelRef1); }} startIcon={ - + } > {t("staking")} @@ -235,7 +245,7 @@ const Products = () => { scrollBottom(e, PanelRef1); }} startIcon={ - + } > {t("analytics")} @@ -247,7 +257,7 @@ const Products = () => { scrollBottom(e, PanelRef1); }} startIcon={ - + } > {t("developer")} @@ -313,15 +323,21 @@ const Products = () => { value={v2} > } + icon={ + + } label={t("validator-infrastructure")} /> } + icon={ + + } label={t("staking")} /> } + icon={ + + } label={t("analytics")} /> @@ -336,11 +352,15 @@ const Products = () => { } + icon={ + + } label={t("developer")} /> } + icon={ + + } label={t("enterprise-solution")} /> @@ -352,7 +372,7 @@ const Products = () => { scrollBottom(e, PanelRef2); }} startIcon={ - + } > {t("validator-infrastructure")} @@ -364,7 +384,7 @@ const Products = () => { scrollBottom(e, PanelRef2); }} startIcon={ - + } > {t("staking")} @@ -376,7 +396,7 @@ const Products = () => { scrollBottom(e, PanelRef2); }} startIcon={ - + } > {t("analytics")} @@ -389,7 +409,11 @@ const Products = () => { scrollBottom(e, PanelRef2); }} startIcon={ - + } > {t("developer")} @@ -401,7 +425,11 @@ const Products = () => { scrollBottom(e, PanelRef2); }} startIcon={ - + } > {t("enterprise-solution")} From 8cc71d82e6925e1fed266fb686972d2b94e3194a Mon Sep 17 00:00:00 2001 From: Ignacio Date: Thu, 28 Dec 2023 21:09:38 +0800 Subject: [PATCH 3/9] chore: fix a11n issues --- .eslintrc.cjs | 2 ++ package.json | 1 + src/components/background.module.scss | 6 +++--- .../mobile_nav_menu/index.module.scss | 11 ++++++++++ .../nav/components/mobile_nav_menu/index.tsx | 13 ++++++------ .../components/social_media/index.module.scss | 6 ++++++ .../components/social_media/index.tsx | 20 ++++++++----------- src/screens/terms_and_conditions/index.tsx | 1 + yarn.lock | 3 ++- 9 files changed, 41 insertions(+), 22 deletions(-) create mode 100644 src/components/nav/components/mobile_nav_menu/index.module.scss diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 543e7480..533dff7b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -42,6 +42,7 @@ module.exports = { "next/core-web-vitals", "plugin:@typescript-eslint/recommended", "plugin:react-hooks/recommended", + "plugin:jsx-a11y/recommended", ], parser: "@typescript-eslint/parser", parserOptions: { @@ -53,6 +54,7 @@ module.exports = { "@typescript-eslint/no-explicit-any": "off", "@next/next/no-img-element": "off", "react/display-name": "off", + "jsx-a11y/anchor-is-valid": "off", "arrow-body-style": "error", "camelcase": "off", diff --git a/package.json b/package.json index e2d67ddf..56aa7000 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "autoprefixer": "^10.4.16", "eslint": "^8.56.0", "eslint-config-next": "^14.0.4", + "eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-playwright": "^0.20.0", "husky": "^8.0.3", "i18next-parser": "^8.9.0", diff --git a/src/components/background.module.scss b/src/components/background.module.scss index a5be255c..8ee7979f 100644 --- a/src/components/background.module.scss +++ b/src/components/background.module.scss @@ -13,11 +13,11 @@ } .horseWrapperDesktop { - top: 0; - right: 0; - left: 0; height: 50vw; + left: 0; position: absolute; + right: 0; + top: 0; @media (max-width: 550px) { img { diff --git a/src/components/nav/components/mobile_nav_menu/index.module.scss b/src/components/nav/components/mobile_nav_menu/index.module.scss new file mode 100644 index 00000000..bae1481d --- /dev/null +++ b/src/components/nav/components/mobile_nav_menu/index.module.scss @@ -0,0 +1,11 @@ +@import "src/styles/sass.scss"; + +.button { + background: transparent; + border: none; + color: inherit; + display: inline-block; + font-family: inherit; + font-size: inherit; + font-weight: inherit; +} diff --git a/src/components/nav/components/mobile_nav_menu/index.tsx b/src/components/nav/components/mobile_nav_menu/index.tsx index ca0c2887..5c68711e 100644 --- a/src/components/nav/components/mobile_nav_menu/index.tsx +++ b/src/components/nav/components/mobile_nav_menu/index.tsx @@ -20,6 +20,7 @@ import { anchorElContext } from "@src/utils/menu"; import CompanyMenuButton from "../company_menu_button"; import LangMenuButton from "../lang_menu_button"; import ProductsMenuButton from "../products_menu_button"; +import * as styles from "./index.module.scss"; const MobileNavMenu = () => { const router = useRouter(); @@ -157,26 +158,26 @@ const MobileNavMenu = () => { : theme.palette.custom.forbole.indigo, }} > -
{ router.push("/products").finally(handleClose); }} - role="button" > {t("Products")} -
-
+
+ diff --git a/src/screens/blog_details/components/social_media/index.module.scss b/src/screens/blog_details/components/social_media/index.module.scss index 751d5db1..403f50cc 100644 --- a/src/screens/blog_details/components/social_media/index.module.scss +++ b/src/screens/blog_details/components/social_media/index.module.scss @@ -3,6 +3,12 @@ .wrapper { padding-bottom: spacing(3); + button { + background: transparent; + border: none; + display: inline-block; + } + svg { margin-right: spacing(2); transition: transform 0.2s ease-in-out; diff --git a/src/screens/blog_details/components/social_media/index.tsx b/src/screens/blog_details/components/social_media/index.tsx index 991fc5b4..0c762e6f 100644 --- a/src/screens/blog_details/components/social_media/index.tsx +++ b/src/screens/blog_details/components/social_media/index.tsx @@ -36,50 +36,46 @@ const SocialMedia = ({ title = "Forbole " }: any) => { return ( - handleClick( `https://telegram.me/share/?url=${shareUrl}&text=${title}`, ) } - role="button" > - - + ); }; diff --git a/src/screens/terms_and_conditions/index.tsx b/src/screens/terms_and_conditions/index.tsx index 5393cfb0..831e0bbd 100644 --- a/src/screens/terms_and_conditions/index.tsx +++ b/src/screens/terms_and_conditions/index.tsx @@ -75,6 +75,7 @@ const TermsAndConditions = () => { className={styles.link} href="" onClick={(e) => scrollToRef(e, ref2)} + role="button" > Section 2 Additional Terms for Staking Service diff --git a/yarn.lock b/yarn.lock index 693709e5..4dc7dea7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5844,7 +5844,7 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:^6.7.1": +"eslint-plugin-jsx-a11y@npm:^6.7.1, eslint-plugin-jsx-a11y@npm:^6.8.0": version: 6.8.0 resolution: "eslint-plugin-jsx-a11y@npm:6.8.0" dependencies: @@ -6237,6 +6237,7 @@ __metadata: dotenv-defaults: "npm:^5.0.2" eslint: "npm:^8.56.0" eslint-config-next: "npm:^14.0.4" + eslint-plugin-jsx-a11y: "npm:^6.8.0" eslint-plugin-playwright: "npm:^0.20.0" framer-motion: "npm:^10.16.16" graphql: "npm:^16.8.1" From 17227197895ad30507191bb6f003e9fa9a878c39 Mon Sep 17 00:00:00 2001 From: Ignacio Date: Thu, 28 Dec 2023 21:45:42 +0800 Subject: [PATCH 4/9] feat: improve internal links --- src/components/Intro_panel/index.tsx | 19 ++++--- src/components/background.tsx | 2 +- .../{styles.module.css => index.module.scss} | 51 +++++++++++++------ src/components/four-table/index.tsx | 26 ++++------ src/components/intro_card/index.tsx | 17 +++---- .../nav/components/mobile_nav_menu/index.tsx | 24 +++------ src/screens/analytics_tools/index.tsx | 12 ++--- .../author/components/author_posts/hooks.tsx | 2 +- .../blog/components/blog_posts/hooks.tsx | 2 +- src/screens/contact/index.tsx | 30 ++++------- src/screens/home/index.tsx | 24 +++------ src/screens/products/index.tsx | 15 +++--- src/screens/staking_service/index.tsx | 16 ++---- .../tag/components/tag_posts/hooks.tsx | 15 ------ .../tag/components/tag_posts/index.tsx | 10 +++- 15 files changed, 115 insertions(+), 150 deletions(-) rename src/components/four-table/{styles.module.css => index.module.scss} (79%) delete mode 100644 src/screens/tag/components/tag_posts/hooks.tsx diff --git a/src/components/Intro_panel/index.tsx b/src/components/Intro_panel/index.tsx index 8911dacf..9e639a5d 100644 --- a/src/components/Intro_panel/index.tsx +++ b/src/components/Intro_panel/index.tsx @@ -2,12 +2,13 @@ import { Stack, Typography, useMediaQuery, useTheme } from "@mui/material"; import Box from "@mui/material/Box"; import type { StaticImageData } from "next/image"; import Image from "next/legacy/image"; +import Link from "next/link"; import CtaButton from "../cta-button"; type Props = { + btnLink?: string; btnName?: string; - btn_Click?: () => void; desc?: string; disabled?: boolean; imageAlt?: string; @@ -18,8 +19,8 @@ type Props = { }; const IntroPanel = ({ + btnLink, btnName, - btn_Click, desc, disabled, imageAlt, @@ -72,14 +73,12 @@ const IntroPanel = ({ > {title} - {btnName && ( - - {btnName} - + {btnName && btnLink && ( + + + {btnName} + + )} diff --git a/src/components/background.tsx b/src/components/background.tsx index b05ae9e8..2909da98 100644 --- a/src/components/background.tsx +++ b/src/components/background.tsx @@ -17,7 +17,7 @@ const Background = ({ displayHorse }: { displayHorse?: boolean }) => { span { - font-weight: 590; font-size: 18px; font-style: normal; + font-weight: 590; line-height: normal; } + .none { display: none; } + @media (max-width: 1024.95px) { .active { flex-basis: max-content; width: 100%; } + .money { font-size: 48px; } + .active .money span { font-size: 48px; } diff --git a/src/components/four-table/index.tsx b/src/components/four-table/index.tsx index d0b26f53..65be1e91 100644 --- a/src/components/four-table/index.tsx +++ b/src/components/four-table/index.tsx @@ -1,11 +1,11 @@ import { Box, Divider, Stack, Typography, useTheme } from "@mui/material"; import useTranslation from "next-translate/useTranslation"; -import { useRouter } from "next/router"; +import Link from "next/link"; import CtaButton from "@src/components/cta-button"; import usePlans from "./config"; -import styles from "./styles.module.css"; +import * as styles from "./index.module.scss"; const clickItem = 2; @@ -14,7 +14,6 @@ type Props = { btnHref: () => void }; const FourTable = ({ btnHref }: Props) => { const { t } = useTranslation("developer_tools"); const theme = useTheme(); - const router = useRouter(); const plans = usePlans(); return ( @@ -175,18 +174,15 @@ const FourTable = ({ btnHref }: Props) => { )}
- router.push(Plan.btnHref) : btnHref} - sx={{ - position: "absolute", - left: "24px", - right: "24px", - bottom: "24px", - [theme.breakpoints.down("laptop")]: { display: "none" }, - }} - > - {Plan.btnName} - + {Plan.btnHref ? ( + + {Plan.btnName} + + ) : ( + + {Plan.btnName} + + )} ))} diff --git a/src/components/intro_card/index.tsx b/src/components/intro_card/index.tsx index 08aea0ca..09a5d713 100644 --- a/src/components/intro_card/index.tsx +++ b/src/components/intro_card/index.tsx @@ -1,6 +1,7 @@ import { Typography } from "@mui/material"; import Box from "@mui/material/Box"; import Image from "next/image"; +import Link from "next/link"; import CtaButton from "../cta-button"; import * as styles from "./index.module.scss"; @@ -11,7 +12,7 @@ type Props = { list?: string[]; imageHref?: string; btnName?: string; - btnClick?: () => void; + btnLink?: string; disabled?: boolean; }; @@ -22,7 +23,7 @@ const IntroCard = ({ imageHref = "", btnName, disabled, - btnClick, + btnLink, }: Props) => ( @@ -48,13 +49,11 @@ const IntroCard = ({ ))} - - {btnName} - + + + {btnName} + + ); diff --git a/src/components/nav/components/mobile_nav_menu/index.tsx b/src/components/nav/components/mobile_nav_menu/index.tsx index 5c68711e..8bd61126 100644 --- a/src/components/nav/components/mobile_nav_menu/index.tsx +++ b/src/components/nav/components/mobile_nav_menu/index.tsx @@ -4,7 +4,7 @@ import { Collapse, ListItem, Stack, useTheme } from "@mui/material"; import IconButton from "@mui/material/IconButton"; import Menu from "@mui/material/Menu"; import useTranslation from "next-translate/useTranslation"; -import { useRouter } from "next/router"; +import Link from "next/link"; import type { MouseEvent } from "react"; import { useContext, useEffect, useState } from "react"; @@ -23,7 +23,6 @@ import ProductsMenuButton from "../products_menu_button"; import * as styles from "./index.module.scss"; const MobileNavMenu = () => { - const router = useRouter(); const { t, lang } = useTranslation("common"); const theme = useTheme(); const { windowDimensions } = useWindowDimensions(); @@ -129,13 +128,9 @@ const MobileNavMenu = () => { py="16px" > - { - router.push("/staking"); - }} - > - {t("StakeNow")} - + + {t("StakeNow")} + { : theme.palette.custom.forbole.indigo, }} > - + + +