import { CircleHelp } from "lucide-react"; import dynamic from "next/dynamic"; import { AccordionComp } from "~/components/accordionComp"; import { LoadingPage } from "~/components/loading"; import { TabRicerca } from "~/components/tables/ricerca-table"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "~/components/ui/card"; import { useTranslation } from "~/providers/I18nProvider"; import type { UsersId } from "~/schemas/public/Users"; import { api } from "~/utils/api"; import { Credenza, CredenzaBody, CredenzaContent, CredenzaDescription, CredenzaHeader, CredenzaTitle, CredenzaTrigger, } from "../custom_ui/credenza"; import { Button } from "../ui/button"; const TimeserieBarChart = dynamic( () => import("~/components/timeserieBarChart").then((mod) => mod.default), { ssr: false, loading: () =>
, }, ); const TimeserieBarChartStacked = dynamic( () => import("~/components/timeserieBarChartStacked").then((mod) => mod.default), { ssr: false, loading: () =>
, }, ); export const AdminDashboard = () => { const { data: stats, isLoading } = api.stats.adminDashStats.useQuery(); if (isLoading) return ; return (

Admin Dashboard

{!stats ? (
Errore caricamento statistiche
) : (
Utenti Numero totale di utenti registrati {stats.userCount}
)}
); }; export const UserDashboard = ({ userId }: { userId: UsersId }) => { const { t } = useTranslation(); return (

Le tue ricerche

Domande frequenti Domande frequenti
); };