From 4cbe1eb74b2ba83c60ab60d715d6e8367c4731b7 Mon Sep 17 00:00:00 2001 From: Fedor Abrashin Date: Wed, 25 Dec 2024 17:17:09 +0300 Subject: [PATCH] fix wrong year date bug --- src/components/CustomLastUpdate/CustomLastUpdate.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/components/CustomLastUpdate/CustomLastUpdate.tsx b/src/components/CustomLastUpdate/CustomLastUpdate.tsx index 220a0c1c..76248e10 100644 --- a/src/components/CustomLastUpdate/CustomLastUpdate.tsx +++ b/src/components/CustomLastUpdate/CustomLastUpdate.tsx @@ -2,31 +2,33 @@ import React from 'react'; import { translate } from '@docusaurus/Translate'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -const NARROW_SPACE = '\u202F'; +const NBSP = '\u00A0'; export const CustomLastUpdate = ({ lastUpdatedAt }: { lastUpdatedAt: number }): JSX.Element => { const { i18n } = useDocusaurusContext(); + const isRuLocale = i18n.currentLocale === 'ru'; + const formattedUpdatedAt = lastUpdatedAt * 1000; return (
{translate({ id: 'lastUpdated.atDate', message: 'Обновлено: ' })} -