diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-24 15:35:33 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-24 15:37:26 +0100 |
| commit | 0bb6411ee9fce02c2e5680f2be5740a1bbb508ad (patch) | |
| tree | 59b574dbda693dc5f1b2605272a6eff3b23802f2 /src/utils | |
| parent | 3956ed77e11455a963ce17a64783d70fa666a7a0 (diff) | |
chore: replace CV content with mdx content
Since I replace the other pages, there is no reason to fetch this page
content through WP GraphQL.
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/helpers/format.ts | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/utils/helpers/format.ts b/src/utils/helpers/format.ts index 8c5e545..fc7f1c2 100644 --- a/src/utils/helpers/format.ts +++ b/src/utils/helpers/format.ts @@ -5,7 +5,6 @@ import { RawArticlePreview, } from '@ts/types/articles'; import { Comment, RawComment } from '@ts/types/comments'; -import { Page, RawPage } from '@ts/types/pages'; import { RawSubject, RawThematic, @@ -202,25 +201,3 @@ export const getFormattedPost = (rawPost: RawArticle): Article => { return formattedPost; }; - -/** - * Format a page from RawPage to Page type. - * @param page - A page coming from WP GraphQL. - * @returns A formatted page. - */ -export const getFormattedPage = (rawPage: RawPage): Page => { - const { date, modified } = rawPage; - const dates = { - publication: date, - update: modified, - }; - - const formattedPage: Page = { - ...rawPage, - content: rawPage.contentParts.afterMore, - dates, - intro: rawPage.contentParts.beforeMore, - }; - - return formattedPage; -}; |
