From 0bb6411ee9fce02c2e5680f2be5740a1bbb508ad Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 24 Dec 2021 15:35:33 +0100 Subject: 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. --- src/utils/helpers/format.ts | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/utils/helpers/format.ts') 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; -}; -- cgit v1.2.3