"use client" import type React from "react" import "./globals.css" import { Inter } from "next/font/google" import { useState, useEffect } from "react" import Sidebar from "./components/Sidebar" import MobileSidebar from "./components/MobileSidebar" import BottomTabs from "@/components/nav/bottom-tabs" import { usePathname } from "next/navigation" import { Toaster } from "@/components/ui/toaster" const inter = Inter({ subsets: ["latin"] }) export default function ClientLayout({ children, }: { children: React.ReactNode }) { const [isMobile, setIsMobile] = useState(false) const [sidebarOpen, setSidebarOpen] = useState(false) const pathname = usePathname() useEffect(() => { const checkMobile = () => { setIsMobile(window.innerWidth < 768) } checkMobile() window.addEventListener("resize", checkMobile) return () => window.removeEventListener("resize", checkMobile) }, []) return ( 卡若数据资产中台 {/* 背景装饰 */}
{/* 桌面端侧边栏 - PC端不显示底部导航 */} {!isMobile && } {/* 移动端侧边栏 */} {isMobile && setSidebarOpen(false)} />} {/* 主内容区域 */}
{/* 移动端头部 - 添加卡若数据资产中台标题 */} {isMobile && (

卡若数据资产中台

)} {/* 内容区域 */}
{children}
{/* 移动端底部导航 - 使用新的BottomTabs组件 */} {isMobile && } ) }