From 304def0c3f4c079baaf457a805203a79e26328a3 Mon Sep 17 00:00:00 2001 From: Mohamed Daahir Date: Mon, 1 Jan 2024 19:08:32 +0000 Subject: [PATCH] set default sections order --- src/components/generator/form/Form.tsx | 4 ++-- src/types.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/generator/form/Form.tsx b/src/components/generator/form/Form.tsx index 2eb024a2..a7a0d238 100644 --- a/src/components/generator/form/Form.tsx +++ b/src/components/generator/form/Form.tsx @@ -26,9 +26,9 @@ const StyledForm = styled.form` overflow: auto; ` -const initialFormValues = { +const initialFormValues: FormValues = { headings: {}, - sections: [], + sections: ['profile', 'education', 'work', 'skills', 'projects', 'awards'], selectedTemplate: 1 } diff --git a/src/types.ts b/src/types.ts index 5d766c2f..854e2d46 100644 --- a/src/types.ts +++ b/src/types.ts @@ -102,7 +102,14 @@ export type Resume = { export type FormValues = Resume & { headings: { [K in keyof Resume]?: string } - sections: (keyof Resume | 'profile')[] + sections: ( + | 'profile' + | 'education' + | 'work' + | 'skills' + | 'projects' + | 'awards' + )[] selectedTemplate: number }