import React from "react"; import { useAuth } from "~/contexts/auth-context"; import { Link, useLocation } from "react-router"; import { Button } from "~/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card"; import toast from "react-hot-toast"; interface DashboardLayoutProps { children: React.ReactNode; } export function DashboardLayout({ children }: DashboardLayoutProps) { const { user, logout } = useAuth(); const handleLogout = async () => { await logout(); }; return (
{/* Header */}
{/* Logo/Title */}
{/* Navigation Menu */}

داشبورد مدیریت

{/* User menu */}
خوش آمدید، {user?.name} {user?.family}
{/* Main content */}
{children}
); } // Navigation Link Component interface NavigationLinkProps { to: string; label: string; } function NavigationLink({ to, label }: NavigationLinkProps) { const location = useLocation(); const isActive = location.pathname === to; return ( {label} ); } export function DashboardHome() { const { user } = useAuth(); return (
{/* Welcome Section */}

خوش آمدید به داشبورد مدیریت

سیستم مدیریت یکپارچه فناوری و نوآوری

{/* Stats Cards */}
کل پروژه‌ها
); }