1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-02 01:17:58 +02:00
unleash.unleash/frontend/src/component/common/Table/cells/FeatureSeenCell/FeatureEnvironmentSeenCell.tsx
andreas-unleash 10c21461bd
feat: Last seen for toggles that have an old usage reported (#4538)
Last seen for toggles that have an old usage reported and no environment

Closes: # [1-1276]
(https://linear.app/unleash/issue/1-1276/last-seen-for-toggles-that-have-an-old-usage-reported-and-that-are)

![Screenshot 2023-08-21 at 14 40
42](https://github.com/Unleash/unleash/assets/104830839/bfa20993-3d52-4c34-959d-f3e34b5c5b47)

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-08-21 14:52:32 +03:00

23 lines
661 B
TypeScript

import React, { VFC } from 'react';
import { IFeatureToggleListItem } from 'interfaces/featureToggle';
import { FeatureEnvironmentSeen } from 'component/feature/FeatureView/FeatureEnvironmentSeen/FeatureEnvironmentSeen';
interface IFeatureSeenCellProps {
feature: IFeatureToggleListItem;
}
export const FeatureEnvironmentSeenCell: VFC<IFeatureSeenCellProps> = ({
feature,
}) => {
const environments = Boolean(feature.environments)
? Object.values(feature.environments)
: [];
return (
<FeatureEnvironmentSeen
featureLastSeen={feature.lastSeenAt}
environments={environments}
/>
);
};