2026-01-23 15:43:05 +07:00
|
|
|
import NavLinks from '@/app/ui/navigation/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';
|
2026-01-28 15:32:19 +07:00
|
|
|
import ActivityTracker from '@/app/components/ActivityTracker';
|
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>
|
2026-01-28 15:32:19 +07:00
|
|
|
<ActivityTracker/>
|
2025-12-02 17:11:53 +07:00
|
|
|
</div>
|
2025-11-25 17:13:16 +07:00
|
|
|
);
|
|
|
|
|
}
|