From 3172e9c91e287872f193f56cd953fb82fd814a8a Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Mon, 13 Apr 2026 02:14:05 +0300 Subject: [PATCH] menu moved to const --- app/[...slug]/page.tsx | 2 +- app/layout.tsx | 8 +----- src/components/App/index.tsx | 3 --- .../Navigation/DesktopNavigation.tsx | 6 +---- .../Navigation/MobileNavigation.tsx | 5 ++-- src/components/Providers.tsx | 17 ------------- src/const.ts | 25 +++++++++++++++++++ src/context/MenuContext.ts | 10 -------- src/remote/api.ts | 23 ----------------- 9 files changed, 30 insertions(+), 69 deletions(-) delete mode 100644 src/components/Providers.tsx delete mode 100644 src/context/MenuContext.ts 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}