51 lines
1.5 KiB
TypeScript
51 lines
1.5 KiB
TypeScript
"use client"
|
|
|
|
import type React from "react"
|
|
|
|
import { useEffect } from "react"
|
|
import { Inter } from "next/font/google"
|
|
import "./globals.css"
|
|
import { ThemeProvider } from "@/components/theme-provider"
|
|
import { SidebarProvider } from "@/components/sidebar-provider"
|
|
import { AppSidebar } from "@/components/app-sidebar"
|
|
import { SidebarInset } from "@/components/ui/sidebar"
|
|
import { Breadcrumbs } from "@/components/breadcrumbs"
|
|
import { useWalletStore } from "@/lib/wallet-store"
|
|
|
|
const inter = Inter({ subsets: ["latin"] })
|
|
|
|
export default function ClientLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode
|
|
}>) {
|
|
// Check for wallet connection on initial load
|
|
const { walletConnected } = useWalletStore()
|
|
|
|
// Log wallet connection status for debugging
|
|
useEffect(() => {
|
|
console.log("Wallet connection status:", walletConnected)
|
|
}, [walletConnected])
|
|
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<body className={inter.className}>
|
|
<ThemeProvider attribute="class" defaultTheme="light" enableSystem disableTransitionOnChange>
|
|
<SidebarProvider>
|
|
<div className="flex min-h-screen">
|
|
<AppSidebar />
|
|
<SidebarInset className="flex-1">
|
|
<main className="flex-1">
|
|
<Breadcrumbs />
|
|
{children}
|
|
</main>
|
|
</SidebarInset>
|
|
</div>
|
|
</SidebarProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|
|
|