mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
37fa469faf
* minor archive table updates * archived date cell * archive import paths
33 lines
935 B
TypeScript
33 lines
935 B
TypeScript
import { useFeaturesArchive } from 'hooks/api/getters/useFeaturesArchive/useFeaturesArchive';
|
|
import { ArchiveTable } from './ArchiveTable/ArchiveTable';
|
|
import { SortingRule } from 'react-table';
|
|
import { usePageTitle } from 'hooks/usePageTitle';
|
|
import { createLocalStorage } from 'utils/createLocalStorage';
|
|
|
|
const defaultSort: SortingRule<string> = { id: 'createdAt' };
|
|
const { value, setValue } = createLocalStorage(
|
|
'FeaturesArchiveTable:v1',
|
|
defaultSort
|
|
);
|
|
|
|
export const FeaturesArchiveTable = () => {
|
|
usePageTitle('Archive');
|
|
|
|
const {
|
|
archivedFeatures = [],
|
|
loading,
|
|
refetchArchived,
|
|
} = useFeaturesArchive();
|
|
|
|
return (
|
|
<ArchiveTable
|
|
title="Archive"
|
|
archivedFeatures={archivedFeatures}
|
|
loading={loading}
|
|
storedParams={value}
|
|
setStoredParams={setValue}
|
|
refetch={refetchArchived}
|
|
/>
|
|
);
|
|
};
|