From f28204416db5a929cf461b0abd355af696440ad6 Mon Sep 17 00:00:00 2001 From: BunyodL Date: Wed, 30 Apr 2025 20:28:25 +0500 Subject: [PATCH] fix: revert changes --- src/app/layout.tsx | 13 ++++++++----- src/features/map/ui/yandex-map.tsx | 2 +- src/widgets/map-section.tsx | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index b4515b9..7766960 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,9 @@ import type { Metadata } from 'next'; import { Inter } from 'next/font/google'; +import { textControlApi } from '@/shared/language/api/text-control.api'; import { Providers } from '@/shared/providers/providers'; +import { makeStore } from '@/shared/store'; import { TextItem } from '@/shared/types/text.types'; import { Footer } from '@/widgets/footer'; @@ -22,10 +24,11 @@ export default async function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { - const response = (await fetch( - `${process.env.NEXT_PUBLIC_BASE_URL}/api/text`, - { method: 'GET' }, - ).then((res) => res.json())) as TextItem[]; + const store = makeStore(); + + const response = await store.dispatch( + textControlApi.endpoints.fetchText.initiate(), + ); return ( - +
{children}