diff --git a/front/src/modules/companies/table/components/CompanyTableMockData.tsx b/front/src/modules/companies/table/components/CompanyTableMockData.tsx new file mode 100644 index 0000000000..500ed892a1 --- /dev/null +++ b/front/src/modules/companies/table/components/CompanyTableMockData.tsx @@ -0,0 +1,11 @@ +import { companyViewFields } from '@/companies/constants/companyViewFields'; +import { useSetEntityTableData } from '@/ui/table/hooks/useSetEntityTableData'; + +import { mockedCompaniesData } from './companies-mock-data'; +export function CompanyTableMockData() { + const setEntityTableData = useSetEntityTableData(); + + setEntityTableData(mockedCompaniesData, companyViewFields, []); + + return <>; +} diff --git a/front/src/modules/companies/table/components/CompanyTableMockMode.tsx b/front/src/modules/companies/table/components/CompanyTableMockMode.tsx index 0b83d8544d..a7de979c8f 100644 --- a/front/src/modules/companies/table/components/CompanyTableMockMode.tsx +++ b/front/src/modules/companies/table/components/CompanyTableMockMode.tsx @@ -3,9 +3,12 @@ import { EntityTable } from '@/ui/table/components/EntityTable'; import { useUpdateOneCompanyMutation } from '~/generated/graphql'; import { availableSorts } from '~/pages/companies/companies-sorts'; +import { CompanyTableMockData } from './CompanyTableMockData'; + export function CompanyTableMockMode() { return ( <> + } diff --git a/front/src/modules/ui/table/components/EntityTable.tsx b/front/src/modules/ui/table/components/EntityTable.tsx index 6f9bcb5655..594f41fb25 100644 --- a/front/src/modules/ui/table/components/EntityTable.tsx +++ b/front/src/modules/ui/table/components/EntityTable.tsx @@ -127,7 +127,7 @@ export function EntityTable({ onSortsUpdate={onSortsUpdate} /> - {viewFields.length && ( + {viewFields.length > 0 && (