diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-20 00:15:20 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-20 00:15:20 +0100 |
| commit | fa6adedc42e9c6ec39cc30df16b54900c220b094 (patch) | |
| tree | 6bb498beadaa382245cecb86ce56931580313c6f /src/pages/mentions-legales.tsx | |
| parent | 2ff898626c5c0abc6b8195224067b992403e313b (diff) | |
refactor: rewrite types and services
I was repeating myself a lot in services. So I rewrited the different
functions to improve readability and I extracted some formatting
functions to put them in utils. I also rewrited/reorganized some types
to keep consistent names.
Diffstat (limited to 'src/pages/mentions-legales.tsx')
| -rw-r--r-- | src/pages/mentions-legales.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pages/mentions-legales.tsx b/src/pages/mentions-legales.tsx index 4ff4104..c90b8d6 100644 --- a/src/pages/mentions-legales.tsx +++ b/src/pages/mentions-legales.tsx @@ -1,6 +1,6 @@ import Layout from '@components/Layouts/Layout'; import { seo } from '@config/seo'; -import { getLegalNoticePage } from '@services/graphql/pages'; +import { getPageByUri } from '@services/graphql/queries'; import { NextPageWithLayout } from '@ts/types/app'; import { PageProps } from '@ts/types/pages'; import { loadTranslation } from '@utils/helpers/i18n'; @@ -35,7 +35,7 @@ export const getStaticProps: GetStaticProps = async ( context.locale!, process.env.NODE_ENV === 'production' ); - const page = await getLegalNoticePage(); + const page = await getPageByUri('/mentions-legales/'); return { props: { |
