MCPcopy Create free account
hub / github.com/HelloCSV/HelloCSV / buildInitialState

Function buildInitialState

src/importer/state.tsx:36–51  ·  view source on GitHub ↗
(
  sheetDefinitions: SheetDefinition[]
)

Source from the content-addressed store, hash-verified

34}
35
36export function buildInitialState(
37 sheetDefinitions: SheetDefinition[]
38): ImporterState {
39 return {
40 sheetDefinitions,
41 currentSheetId: sheetDefinitions[0].id,
42 mode: 'upload',
43 validationErrors: [],
44 validationInProgress: false,
45 sheetData: sheetDefinitions.map((sheet) => ({
46 sheetId: sheet.id,
47 rows: [],
48 })),
49 importProgress: 0,
50 };
51}
52
53async function buildStateWithIndexedDB(
54 sheetDefinitions: SheetDefinition[],

Callers 5

reducerFunction · 0.90
usePersistedReducerFunction · 0.90
buildStateFunction · 0.85
buildStateWithIndexedDBFunction · 0.85
constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected