import { Navigate, Outlet } from "react-router-dom";

export default function AdminGuard() {
  const key = sessionStorage.getItem("admin_key");
  if (!key) return <Navigate to="/admin" replace />;
  return <Outlet />;
}
