From 0d59a6d2995b4119865271ed1908ede0bb96497c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 9 May 2022 18:19:38 +0200 Subject: refactor: rewrite DescriptionList and Meta components The meta can have different layout. The previous implementation was not enough to easily change the layout. Also, I prefer to restrict the meta types and it prevents me to repeat myself for the labels. --- src/utils/helpers/dates.ts | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/utils/helpers') diff --git a/src/utils/helpers/dates.ts b/src/utils/helpers/dates.ts index fa167a7..cb56ad2 100644 --- a/src/utils/helpers/dates.ts +++ b/src/utils/helpers/dates.ts @@ -1,4 +1,3 @@ -import { Dates } from '@ts/types/app'; import { settings } from '@utils/config'; /** @@ -39,17 +38,3 @@ export const getFormattedTime = ( return locale === 'fr' ? formattedTime.replace(':', 'h') : formattedTime; }; - -/** - * Retrieve a Dates object. - * - * @param publication - The publication date. - * @param update - The update date. - * @returns {Dates} A Dates object. - */ -export const getDates = (publication: string, update: string): Dates => { - return { - publication: getFormattedDate(publication), - update: getFormattedDate(update), - }; -}; -- cgit v1.2.3