23 lines
504 B
TypeScript
23 lines
504 B
TypeScript
'use client'
|
|
|
|
import { Sidebar } from '@/components/sidebar'
|
|
import { useSearchParams } from 'next/navigation'
|
|
|
|
export default function AppLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
const searchParams = useSearchParams()
|
|
const productName = searchParams.get('product') || undefined
|
|
|
|
return (
|
|
<div className="flex h-screen bg-background">
|
|
<Sidebar productName={productName} />
|
|
<main className="flex-1 overflow-auto">
|
|
{children}
|
|
</main>
|
|
</div>
|
|
)
|
|
}
|