Files
no-copy-frontend/src/app/[locale]/pages/layout.tsx
T

25 lines
761 B
TypeScript
Raw Normal View History

2025-11-25 17:13:16 +07:00
import NavLinks from '@/app/ui/nav-links'
2025-12-10 16:39:13 +07:00
import HeaderPanel from '@/app/ui/header/headerPanel';
2025-12-02 17:11:53 +07:00
import { getQueryClient } from '@/app/providers/getQueryClient';
import { HydrationBoundary, dehydrate } from '@tanstack/react-query';
2025-12-26 14:03:57 +07:00
import { prefetchLayoutQueries } from '@/app/lib/prefetch-queries';
2025-11-29 14:40:26 +07:00
export default async function Layout({ children }: { children: React.ReactNode }) {
2025-12-02 17:11:53 +07:00
const queryClient = getQueryClient();
2025-11-29 14:40:26 +07:00
2025-12-26 14:03:57 +07:00
await prefetchLayoutQueries(queryClient);
2025-11-25 17:13:16 +07:00
return (
2025-12-02 17:11:53 +07:00
<div className="flex">
<HydrationBoundary state={dehydrate(queryClient)}>
2025-11-29 14:40:26 +07:00
<NavLinks />
2025-12-27 11:54:54 +07:00
<div className="main-containter-wrapper">
2025-11-29 14:40:26 +07:00
<HeaderPanel />
2025-12-27 11:54:54 +07:00
<main className="main-containter">
2025-11-29 14:40:26 +07:00
{children}
</main>
</div>
2025-12-02 17:11:53 +07:00
</HydrationBoundary>
</div>
2025-11-25 17:13:16 +07:00
);
}