import { useGetIdentity, useListContext, useTranslate } from "ra-core"; import { CreateButton } from "@/components/ds/admin/create-button"; import { ExportButton } from "@/components/ds/admin/export-button"; import { List } from "@/components/ds/admin/list"; import { ListPagination } from "@/components/ds/admin/list-pagination"; import { SortButton } from "@/components/ds/admin/sort-button"; import { Skeleton } from "@/components/ds/ui/skeleton"; import { Card } from "@/components/ds/ui/card"; import { TopToolbar } from "../layout/TopToolbar"; import { CompanyEmpty } from "./CompanyEmpty"; import { CompanyListFilter } from "./CompanyListFilter"; import { ImageList } from "./GridList"; export const CompanyList = () => { return ( } pagination={} > ); }; const CompanyListLayout = () => { const { data, isPending, filterValues } = useListContext(); const { identity } = useGetIdentity(); const hasFilters = filterValues && Object.keys(filterValues).length > 0; // Show loading skeleton while identity or data is loading if (!identity || isPending) { return (
); } if (!data?.length && !hasFilters) return ; return (
); }; const CompanyListActions = () => { const translate = useTranslate(); return ( ); };