1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-31 01:16:01 +02:00

feat: archived label tooltip correct format (#8610)

![image](https://github.com/user-attachments/assets/7f18236f-28c5-439a-969f-d2b1e08b60da)
This commit is contained in:
Jaanus Sellin 2024-10-31 13:28:35 +02:00 committed by GitHub
parent 2934f85743
commit ca307b2bab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,8 @@ import { Badge } from '../../../Badge/Badge';
import { HtmlTooltip } from '../../../HtmlTooltip/HtmlTooltip';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
import { useLocationSettings } from 'hooks/useLocationSettings';
import { getLocalizedDateString } from '../../../util';
interface IFeatureNameCellProps {
row: {
@ -275,6 +277,11 @@ export const PrimaryFeatureInfo: FC<{
(featureType) => featureType.id === type,
)?.name;
const title = `${typeName || type} flag`;
const { locationSettings } = useLocationSettings();
const archivedDate = getLocalizedDateString(
archivedAt,
locationSettings.locale,
);
const TypeIcon = () => (
<HtmlTooltip arrow title={title} describeChild>
@ -333,7 +340,7 @@ export const PrimaryFeatureInfo: FC<{
}
/>
{archivedAt && (
<HtmlTooltip arrow title={archivedAt} describeChild>
<HtmlTooltip arrow title={archivedDate} describeChild>
<Badge color='neutral'>Archived</Badge>
</HtmlTooltip>
)}