diff options
Diffstat (limited to 'src/utils/helpers/format.ts')
| -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; -}; |
