mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-09 01:17:06 +02:00
feat: archived label tooltip correct format (#8610)

This commit is contained in:
parent
2934f85743
commit
ca307b2bab
@ -11,6 +11,8 @@ import { Badge } from '../../../Badge/Badge';
|
|||||||
import { HtmlTooltip } from '../../../HtmlTooltip/HtmlTooltip';
|
import { HtmlTooltip } from '../../../HtmlTooltip/HtmlTooltip';
|
||||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||||
import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
|
import { useFeature } from 'hooks/api/getters/useFeature/useFeature';
|
||||||
|
import { useLocationSettings } from 'hooks/useLocationSettings';
|
||||||
|
import { getLocalizedDateString } from '../../../util';
|
||||||
|
|
||||||
interface IFeatureNameCellProps {
|
interface IFeatureNameCellProps {
|
||||||
row: {
|
row: {
|
||||||
@ -275,6 +277,11 @@ export const PrimaryFeatureInfo: FC<{
|
|||||||
(featureType) => featureType.id === type,
|
(featureType) => featureType.id === type,
|
||||||
)?.name;
|
)?.name;
|
||||||
const title = `${typeName || type} flag`;
|
const title = `${typeName || type} flag`;
|
||||||
|
const { locationSettings } = useLocationSettings();
|
||||||
|
const archivedDate = getLocalizedDateString(
|
||||||
|
archivedAt,
|
||||||
|
locationSettings.locale,
|
||||||
|
);
|
||||||
|
|
||||||
const TypeIcon = () => (
|
const TypeIcon = () => (
|
||||||
<HtmlTooltip arrow title={title} describeChild>
|
<HtmlTooltip arrow title={title} describeChild>
|
||||||
@ -333,7 +340,7 @@ export const PrimaryFeatureInfo: FC<{
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{archivedAt && (
|
{archivedAt && (
|
||||||
<HtmlTooltip arrow title={archivedAt} describeChild>
|
<HtmlTooltip arrow title={archivedDate} describeChild>
|
||||||
<Badge color='neutral'>Archived</Badge>
|
<Badge color='neutral'>Archived</Badge>
|
||||||
</HtmlTooltip>
|
</HtmlTooltip>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user