aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/404.tsx
Commit message (Collapse)AuthorAgeFilesLines
* refactor(pages): refine 404 pageArmand Philippot2023-12-091-77/+117
| | | | | * refresh topics and thematics list using hooks * add Cypress tests
* fix(pages,services): make thematics & topics pages usable againArmand Philippot2023-11-291-3/+8
| | | | | | | | | | When I refactored the fetchers and convertors in #f111685 I forgot to convert WPThematicPreview and WPTopicPreview so the thematics and topics pages was broken. I also: * removed the ToC added by error in #70b4f63 * fix heading styles * fix website url in topics pages
* refactor(services, types): reorganize GraphQL fetchers and data typesArmand Philippot2023-11-271-21/+16
| | | | | | | | | | | | 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
* refactor(components): replace PageLayout template with PageArmand Philippot2023-11-201-39/+41
| | | | | | | | | * split pages in smaller components (it is both easier to maintain and more readable, we avoid the use of fragments in pages directory) * extract breadcrumbs from article tag (the navigation is not related to the page contents) * remove useReadingTime hook * remove layout options except `isHome`
* refactor(hooks): remove useSettings hookArmand Philippot2023-11-151-3/+3
| | | | | | | It does not make sense to re-export an existing object through a hook. On some pages both the hook and the object was imported... It is better to use the CONFIG (previously settings) object directly and by doing it we avoid potential errors because of conditional hooks.
* refactor(components): replace LinksListWidget with LinksWidgetArmand Philippot2023-11-141-6/+6
| | | | | | | * avoid List component repeat * rewrite tests and CSS * add an id to LinksWidgetItemData (previously LinksListItems) type because the label could be duplicated
* refactor(components): rewrite SearchForm componentArmand Philippot2023-11-111-2/+26
| | | | | | * remove searchPage prop (the consumer should handle the submit) * change onSubmit type * use `useForm` hook to handle the form
* refactor(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-111-8/+15
| | | | | | The HeadingButton component was only used inside Widget component and it is not very useful on its own so I merge the two components in a new Collapsible component.
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-241-9/+13
| | | | | | | | It makes it easier to change a route if needed and it avoid typo mistakes. I also refactored a bit the concerned files to be complient with the new ESlint config. However, I should rewrite the pages to reduce the number of statements.
* refactor(components): rewrite form componentsArmand Philippot2023-10-241-1/+1
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-201-16/+15
| | | | | | 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.
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-191-17/+17
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* chore: add a search form on 404 pageArmand Philippot2022-05-241-0/+9
|
* fix: ensure all topics/thematics have the base urlArmand Philippot2022-05-231-4/+4
|
* chore: use persistent layoutArmand Philippot2022-05-171-2/+7
| | | | | It prevents to rerender the common components between pages (header, footer...).
* refactor: use custom hook for breadcrumb items and schemaArmand Philippot2022-05-161-10/+6
|
* chore: add 404 pageArmand Philippot2022-05-161-0/+144
|
* chore: remove old pages, components, helpers and typesArmand Philippot2022-04-291-85/+0
| | | | | Since I'm using new components, I will also rewrite the GraphQL queries so it is easier to start from scratch.
* refactor: use formatjs swc pluginArmand Philippot2022-03-231-0/+5
| | | | | I'm not able to configure SWC plugins in Next.js so to make it works, all translation must have an id.
* refactor(config): move config from config dir to utilsArmand Philippot2022-01-291-2/+2
|
* chore: replace lingui functions with react-intlArmand Philippot2022-01-291-18/+44
|
* chore(i18n): replace i18n provider and helpersArmand Philippot2022-01-291-3/+3
|
* fix: handle translation with linguiArmand Philippot2022-01-281-6/+4
| | | | | | | | The previous method was not working so I tried a different approach. Translation is loaded but I'm still getting warnings: * Plurals for locale undefined aren't loaded * Text content did not match I can't figure how to fix them...
* chore: fix 404 page gridArmand Philippot2022-01-081-3/+4
|
* refactor: reuse PostHeader for all pages except homepageArmand Philippot2022-01-061-1/+2
|
* chore: add a breadcrumb componentArmand Philippot2021-12-211-3/+5
|
* chore: add a 404 pageArmand Philippot2021-12-181-0/+52