import { Card, CardContent } from "@mui/material";
import { Title, useDataProvider } from "react-admin";
import { useQuery } from "@tanstack/react-query";

export const AdminDashboard = () => {
  const dataProvider = useDataProvider();
  const { data } = useQuery({
    queryKey: ["dashboard"],
    queryFn: () => dataProvider.person(),
  });

  console.log(data);

  return (
    <Card>
      <Title title="Welcome to the administration" />
      <CardContent>Lorem ipsum sic dolor amet...</CardContent>
    </Card>
  );
};
