"use client" import { usePathname } from "next/navigation" import { useEffect, useState } from "react" import { BottomNav } from "./bottom-nav" import { ConfigLoader } from "../config/config-loader" export function LayoutWrapper({ children }: { children: React.ReactNode }) { const pathname = usePathname() const [mounted, setMounted] = useState(false) const isAdmin = pathname?.startsWith("/admin") const isView = pathname?.startsWith("/view") || pathname === "/" useEffect(() => { setMounted(true) }, []) if (!mounted) { return (
{children}
) } if (isAdmin) { return (
{children}
) } return (
{children}
) }