interface Props { children: React.ReactNode; } export const SettingsLayout = ({ children }: Props) => { const { data } = api.auth.get.useQuery(); const { data: user } = api.user.byAuthId.useQuery( { authId: data?.id || "", }, { enabled: !!data?.id && data?.rol === "user", }, ); return (
{children}
); }; import { Activity, Bell, Database, type LucideIcon, Route, Server, ShieldCheck, User2, Users, } from "lucide-react"; import Link from "next/link"; import { buttonVariants } from "@/components/ui/button"; import { cn } from "@/lib/utils"; import { api } from "@/utils/api"; import { useRouter } from "next/router"; interface NavProps { links: { title: string; label?: string; icon: LucideIcon; href: string; }[]; } export const Nav = ({ links }: NavProps) => { const router = useRouter(); return (
); };