"use client" import Link from "next/link" import { AuthGuard } from "@/components/auth-guard" import { DashboardSidebar } from "@/components/dashboard-sidebar" import { Header } from "@/components/header" import { Button } from "@/components/ui/button" import { useAuthStore } from "@/store/auth" export default function DashboardLayout({ children }: { children: React.ReactNode }) { const isAuthenticated = useAuthStore((state) => state.isAuthenticated) const currentRole = useAuthStore((state) => state.currentRole) return (
{isAuthenticated && currentRole === "consumer" ? (
) : ( children )}
) }