Initial miaojingAI project with image resolution guard
This commit is contained in:
25
src/components/app-shell.tsx
Normal file
25
src/components/app-shell.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
'use client';
|
||||
|
||||
import type { ReactNode } from 'react';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
import { Navbar } from '@/components/navbar';
|
||||
import { SiteConfigSync } from '@/components/site-config-sync';
|
||||
import { VisitTracker } from '@/components/visit-tracker';
|
||||
import { AccountThemeSync } from '@/components/account-theme-sync';
|
||||
|
||||
export function AppShell({ children }: { children: ReactNode }) {
|
||||
const pathname = usePathname();
|
||||
const isConsole = pathname === '/console' || pathname.startsWith('/console/');
|
||||
|
||||
return (
|
||||
<>
|
||||
<SiteConfigSync />
|
||||
<AccountThemeSync />
|
||||
{!isConsole && <VisitTracker />}
|
||||
{!isConsole && <Navbar />}
|
||||
<main>{children}</main>
|
||||
<Toaster />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user