From 2331051eeb0fcc043ade986bd6257fedc06ced36 Mon Sep 17 00:00:00 2001 From: Pierre-Philippe Date: Wed, 2 Oct 2024 11:06:20 +0200 Subject: [PATCH] fix(pci.rancher): delete useless useref ref: TAPC-1615 Signed-off-by: Pierre-Philippe --- .../Dashboard/RancherDetail/RancherDetail.component.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/manager/apps/pci-rancher/src/components/layout-helpers/Dashboard/RancherDetail/RancherDetail.component.tsx b/packages/manager/apps/pci-rancher/src/components/layout-helpers/Dashboard/RancherDetail/RancherDetail.component.tsx index 1fef21991f10..0990541f6025 100644 --- a/packages/manager/apps/pci-rancher/src/components/layout-helpers/Dashboard/RancherDetail/RancherDetail.component.tsx +++ b/packages/manager/apps/pci-rancher/src/components/layout-helpers/Dashboard/RancherDetail/RancherDetail.component.tsx @@ -1,5 +1,5 @@ import { format } from 'date-fns'; -import * as dateFnsLocales from 'date-fns/locale'; +import * as locales from 'date-fns/locale'; import { getDateFnsLocale } from '@ovh-ux/manager-core-utils'; import { @@ -24,7 +24,7 @@ import { OsdsText, OsdsTile, } from '@ovhcloud/ods-components/react'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import { useHref } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; @@ -129,7 +129,7 @@ const RancherDetail = ({ getLatestVersionAvailable(rancher, versions) && isReadyStatus && !updateSoftwareResponseType; - const locales = useRef({ ...dateFnsLocales }).current; + const userLocale = getDateFnsLocale(i18n.language); const displayDate = useCallback(