mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-18 00:52:21 +03:00
Fix table mock mode (#1007)
This commit is contained in:
parent
58e5d24261
commit
a90cbac5e6
@ -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 <></>;
|
||||
}
|
@ -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 (
|
||||
<>
|
||||
<CompanyTableMockData />
|
||||
<EntityTable
|
||||
viewName="All Companies"
|
||||
viewIcon={<IconList size={16} />}
|
||||
|
@ -127,7 +127,7 @@ export function EntityTable<SortField>({
|
||||
onSortsUpdate={onSortsUpdate}
|
||||
/>
|
||||
<StyledTableWrapper>
|
||||
{viewFields.length && (
|
||||
{viewFields.length > 0 && (
|
||||
<StyledTable>
|
||||
<EntityTableHeader viewFields={viewFields} />
|
||||
<EntityTableBody />
|
||||
|
Loading…
Reference in New Issue
Block a user