aboutsummaryrefslogtreecommitdiffstats
path: root/src/types/index.ts
Commit message (Collapse)AuthorAgeFilesLines
* refactor(pages): refine Contact pageArmand Philippot2023-12-111-1/+0
| | | | | | | * remove next/router dependency * remove pageTitle since it is defined in MDX * reduce statements by grouping messages * mock response with MSW and add test for sendEmail
* refactor(services, types): reorganize GraphQL fetchers and data typesArmand Philippot2023-11-271-3/+2
| | | | | | | | | | | | The Typescript mapped types was useful for autocompletion in fetchers but their are harder to maintain. I think it's better to keep each query close to its fetcher to have a better understanding of the fetched data. So I: * colocate queries with their own fetcher * colocate mutations with their own mutator * remove Typescript mapped types for queries and mutations * move data convertors inside graphql services * rename most of data types and fetchers
* feat(hooks): add an useForm hookArmand Philippot2023-11-111-0/+1
| | | | | | | | | * add two "sub"-hooks: useFormValues and useFormSubmit (that can be used independently) * handle initial data * handle custom submit callback * handle data validation * handle submit status
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-0/+5
Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements.