Files
twenty/packages/twenty-front/src/modules/object-metadata/context/PreComputedChipGeneratorsContext.ts
Aditya Pimpalkar 4a67cfa1c3 feat: Revamp navigation bar (#6031)
closes: #4428

Testing for fetchMoreRecords is pending, along with component tests

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-07-16 14:38:17 +02:00

25 lines
814 B
TypeScript

import { createContext } from 'react';
import { RecordChipData } from '@/object-record/record-field/types/RecordChipData';
import { ObjectRecord } from '@/object-record/types/ObjectRecord';
export type ChipGeneratorPerObjectNameSingularPerFieldName = Record<
string,
Record<string, (record: ObjectRecord) => RecordChipData>
>;
export type IdentifierChipGeneratorPerObject = Record<
string,
(record: ObjectRecord) => RecordChipData
>;
export type PreComputedChipGeneratorsContextProps = {
chipGeneratorPerObjectPerField: ChipGeneratorPerObjectNameSingularPerFieldName;
identifierChipGeneratorPerObject: IdentifierChipGeneratorPerObject;
};
export const PreComputedChipGeneratorsContext =
createContext<PreComputedChipGeneratorsContextProps>(
{} as PreComputedChipGeneratorsContextProps,
);