1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-18 13:48:58 +02:00
Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-10-04 13:08:14 +03:00
parent a14f0e2e85
commit c3f4ca8f7d
No known key found for this signature in database
GPG Key ID: DB82A1577B38F66B
2 changed files with 4 additions and 4 deletions

View File

@ -6,12 +6,12 @@ import { FeatureTypeSchema } from 'openapi';
export const formatExpiredAt = (
feature: IFeatureToggleListItem,
featureTypes: FeatureTypeSchema[],
featureTypes: FeatureTypeSchema[]
): string | undefined => {
const { type, createdAt } = feature;
const featureType = featureTypes.find(
(featureType) => featureType.name === type,
featureType => featureType.name === type
);
if (

View File

@ -8,12 +8,12 @@ export type ReportingStatus = 'potentially-stale' | 'healthy';
export const formatStatus = (
feature: IFeatureToggleListItem,
featureTypes: FeatureTypeSchema[],
featureTypes: FeatureTypeSchema[]
): ReportingStatus => {
const { type, createdAt } = feature;
const featureType = featureTypes.find(
(featureType) => featureType.name === type,
featureType => featureType.name === type
);
const date = parseISO(createdAt);
const now = new Date();