File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change 1
- import { useRouter } from "next/router"
2
1
import { useTranslation } from "next-i18next"
3
2
import { useTheme } from "next-themes"
4
3
import {
@@ -29,12 +28,9 @@ import { EthereumIcon } from "@/components/icons/EthereumIcon"
29
28
30
29
import { trackCustomEvent } from "@/lib/utils/matomo"
31
30
32
- import { FROM_QUERY } from "@/lib/constants"
33
-
34
31
import type { NavSections } from "./types"
35
32
36
33
export const useNav = ( ) => {
37
- const { asPath } = useRouter ( )
38
34
const { isOpen, onToggle } = useDisclosure ( )
39
35
const { t } = useTranslation ( "common" )
40
36
const { theme, setTheme } = useTheme ( )
@@ -472,12 +468,6 @@ export const useNav = () => {
472
468
} ,
473
469
}
474
470
475
- const splitPath = asPath . split ( "/" )
476
- const fromPageParameter =
477
- splitPath . length > 1 && splitPath [ 1 ] !== "languages"
478
- ? `?${ FROM_QUERY } =/${ splitPath . slice ( 1 ) . join ( "/" ) } `
479
- : ""
480
-
481
471
const toggleColorMode = ( ) => {
482
472
setTheme ( theme === "dark" ? "light" : "dark" )
483
473
setColorMode ( theme === "dark" ? "light" : "dark" )
@@ -489,14 +479,12 @@ export const useNav = () => {
489
479
}
490
480
491
481
const mobileNavProps = {
492
- fromPageParameter,
493
482
isOpen,
494
483
toggleColorMode,
495
484
onToggle,
496
485
}
497
486
498
487
return {
499
- fromPageParameter,
500
488
linkSections,
501
489
mobileNavProps,
502
490
toggleColorMode,
You can’t perform that action at this time.
0 commit comments