diff --git a/app/[...slug]/page.tsx b/app/[...slug]/page.tsx
index 7eb661cd..ad403cb0 100644
--- a/app/[...slug]/page.tsx
+++ b/app/[...slug]/page.tsx
@@ -3,7 +3,7 @@ import { notFound } from "next/navigation"
import { App } from "@/components/App"
import { PageContent } from "@/components/PageContent"
import { MetaBuilder, buildMetadata } from "@/lib/meta"
-import { getMenu, getPageBySlug, getUrls } from "@/remote/api"
+import { getPageBySlug, getUrls } from "@/remote/api"
import { tail } from "@/lib/array"
export const revalidate = 30
diff --git a/app/layout.tsx b/app/layout.tsx
index 6cc334cc..b1a38e62 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -7,9 +7,7 @@ import "src/style/kazimir/video.css"
import type { Metadata, Viewport } from "next"
import Script from "next/script"
import { Roboto } from "next/font/google"
-import { Providers } from "@/components/Providers"
import { YMetrika } from "@/components/YMetrika"
-import { getMenu } from "@/remote/api"
const roboto = Roboto({
weight: ["300", "900"],
@@ -61,8 +59,6 @@ export const viewport: Viewport = {
export const revalidate = 30
export default async function RootLayout({ children }: { children: React.ReactNode }) {
- const menu = await getMenu()
-
return (
@@ -71,9 +67,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
)}
-
- {children}
-
+ {children}
diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx
index 54697463..5bfa43f4 100644
--- a/src/components/App/index.tsx
+++ b/src/components/App/index.tsx
@@ -2,9 +2,7 @@
import s from "./app.module.css"
-import { useContext } from "react"
import { Wrapper } from "../Wrapper"
-import { MenuContext } from "@/context/MenuContext"
import { Footer } from "../Footer"
import { Content } from "../Content"
import { Breadcrumbs } from "../Breadcrumbs"
@@ -42,7 +40,6 @@ export function App({ showAuthor = false, ...props }: AppProps) {
const hideBreadcrumbs = useMobile()
const accessibility = useAccessibility()
const pathname = usePathname()
- const menu = useContext(MenuContext)
return (
@@ -30,4 +27,3 @@ export function DesktopNavigation({ style, className }: DesktopNavigationProps)
)
}
-
diff --git a/src/components/Navigation/MobileNavigation.tsx b/src/components/Navigation/MobileNavigation.tsx
index 8d3d9d9b..e9ba4098 100644
--- a/src/components/Navigation/MobileNavigation.tsx
+++ b/src/components/Navigation/MobileNavigation.tsx
@@ -3,8 +3,7 @@
import s from "./nav.module.css"
import { Menu } from "../Menu"
-import { useCallback, useContext, useEffect, useRef } from "react"
-import { MenuContext } from "@/context/MenuContext"
+import { useCallback, useEffect, useRef } from "react"
import { Box } from "@/ui/Box"
import { Spacer } from "../Spacer"
import HudozkaLogo from "../HudozkaLogo"
@@ -12,6 +11,7 @@ import { HudozkaTitle } from "../HudozkaTitle"
import Link from "next/link"
import { usePathname } from "next/navigation"
import { HiOutlineMenuAlt4, HiOutlineX } from "react-icons/hi"
+import { menu } from "@/const"
export type MobileNavigationProps = {
className?: string
@@ -19,7 +19,6 @@ export type MobileNavigationProps = {
}
export function MobileNavigation({ className, style }: MobileNavigationProps) {
- const menu = useContext(MenuContext)
const detailsRef = useRef(null)
const pathname = usePathname()
diff --git a/src/components/Providers.tsx b/src/components/Providers.tsx
deleted file mode 100644
index b141013f..00000000
--- a/src/components/Providers.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-"use client"
-
-import { MenuContext } from "@/context/MenuContext"
-import type { MenuItem } from "@/types"
-
-export type ProvidersProps = {
- menu: MenuItem[]
- children: React.ReactNode
-}
-
-export function Providers({ menu, children }: ProvidersProps) {
- return (
-
- {children}
-
- )
-}
diff --git a/src/const.ts b/src/const.ts
index b8abafd6..9e291ec7 100644
--- a/src/const.ts
+++ b/src/const.ts
@@ -1,2 +1,27 @@
+import type { MenuItem } from "./types"
+
export const yearRange = [2012, 2026].join("—")
export const siteUrl = "https://art.shlisselburg.org"
+
+export const menu: MenuItem[] = [
+ {
+ name: "Школа",
+ href: "/",
+ },
+ {
+ name: "Предметы",
+ href: "/cources",
+ },
+ {
+ name: "Коллектив",
+ href: "/collective",
+ },
+ {
+ name: "Документы",
+ href: "/documents",
+ },
+ {
+ name: "Сведения об образовательной организации",
+ href: "/info",
+ },
+]
diff --git a/src/context/MenuContext.ts b/src/context/MenuContext.ts
deleted file mode 100644
index 51e43928..00000000
--- a/src/context/MenuContext.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { createContext } from "react"
-
-export const menu = [
- {
- name: "Школа",
- href: "/",
- },
-]
-
-export const MenuContext = createContext(menu)
diff --git a/src/remote/api.ts b/src/remote/api.ts
index 84028c56..efad4fac 100644
--- a/src/remote/api.ts
+++ b/src/remote/api.ts
@@ -142,29 +142,6 @@ export async function getHomeCards(): Promise {
}
}
-export async function getMenu(): Promise