rename config context to menu context; move config to state
This commit is contained in:
1 parent
20c59affd7
commit
945947aa22
8 files changed
+45
-36
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { Menu } from "../Menu"
|
||||
import { useContext } from "react"
|
||||
import { ConfigContext } from "src/context/ConfigContext"
|
||||
import { MenuContext } from "@/context/MenuContext"
|
||||
import { Box } from "@/ui/Box"
|
||||
import { HudozkaLogo } from "../HudozkaLogo"
|
||||
import { useDarkTheme } from "@/hooks/useDarkTheme"
|
||||
@@ -14,7 +14,7 @@ export type DesktopNavigationProps = {
|
||||
|
||||
export const DesktopNavigation: React.FC<DesktopNavigationProps> = ({ style }) => {
|
||||
const dark = useDarkTheme()
|
||||
const { menu } = useContext(ConfigContext)
|
||||
const menu = useContext(MenuContext)
|
||||
|
||||
return (
|
||||
<Box wrap gap={"var(--size-s)"} style={style}>
|
||||
|
||||
@@ -2,7 +2,7 @@ import { MenuToggle } from "../MenuToggle"
|
||||
import { Menu } from "../Menu"
|
||||
import { Overlay } from "@/ui/Overlay"
|
||||
import { useContext } from "react"
|
||||
import { ConfigContext } from "src/context/ConfigContext"
|
||||
import { MenuContext } from "@/context/MenuContext"
|
||||
import { Box } from "@/ui/Box"
|
||||
import { Spacer } from "../Spacer"
|
||||
import { useToggle } from "react-use"
|
||||
@@ -18,7 +18,7 @@ export type MobileNavigationProps = {
|
||||
export const MobileNavigation: React.FC<MobileNavigationProps> = ({ style }) => {
|
||||
const dark = useDarkTheme()
|
||||
const [open, toggleOpen] = useToggle(false)
|
||||
const { menu } = useContext(ConfigContext)
|
||||
const menu = useContext(MenuContext)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in new issue
Block a user