diff --git a/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx b/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx index c08c9a02f9..3390682dbe 100644 --- a/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx +++ b/frontend/src/component/archive/ArchiveTable/ArchiveTable.tsx @@ -19,7 +19,6 @@ import { Search } from 'component/common/Search/Search'; import { FeatureTypeCell } from 'component/common/Table/cells/FeatureTypeCell/FeatureTypeCell'; import { FeatureSeenCell } from 'component/common/Table/cells/FeatureSeenCell/FeatureSeenCell'; import { LinkCell } from 'component/common/Table/cells/LinkCell/LinkCell'; -import { FeatureStaleCell } from 'component/feature/FeatureToggleList/FeatureStaleCell/FeatureStaleCell'; import { ArchivedFeatureActionCell } from 'component/archive/ArchiveTable/ArchivedFeatureActionCell/ArchivedFeatureActionCell'; import { featuresPlaceholder } from 'component/feature/FeatureToggleList/FeatureToggleListTable'; import theme from 'themes/theme'; @@ -36,6 +35,8 @@ import { useConditionallyHiddenColumns } from 'hooks/useConditionallyHiddenColum import { RowSelectCell } from '../../project/Project/ProjectFeatureToggles/RowSelectCell/RowSelectCell'; import { BatchSelectionActionsBar } from '../../common/BatchSelectionActionsBar/BatchSelectionActionsBar'; import { ArchiveBatchActions } from './ArchiveBatchActions'; +import { FeatureEnvironmentSeenCell } from 'component/common/Table/cells/FeatureSeenCell/FeatureEnvironmentSeenCell'; +import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; export interface IFeaturesArchiveTableProps { archivedFeatures: FeatureSchema[]; @@ -74,6 +75,11 @@ export const ArchiveTable = ({ searchParams.get('search') || '' ); + const { uiConfig } = useUiConfig(); + const showEnvironmentLastSeen = Boolean( + uiConfig.flags.lastSeenByEnvironment + ); + const onRevive = useCallback( async (feature: string) => { try { @@ -113,11 +119,16 @@ export const ArchiveTable = ({ : []), { Header: 'Seen', - width: 85, - canSort: true, - Cell: FeatureSeenCell, accessor: 'lastSeenAt', + Cell: ({ value, row: { original: feature } }: any) => { + return showEnvironmentLastSeen ? ( + + ) : ( + + ); + }, align: 'center', + maxWidth: 80, }, { Header: 'Type', @@ -197,7 +208,7 @@ export const ArchiveTable = ({ }, ], //eslint-disable-next-line - [projectId] + [projectId, showEnvironmentLastSeen] ); const {