1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-08 01:15:49 +02:00

fix: always show tokens page header (#1050)

This commit is contained in:
olav 2022-06-01 09:14:27 +02:00 committed by GitHub
parent c8fccfb9ed
commit c6f0a20fd6

View File

@ -28,7 +28,7 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit
import { HighlightCell } from 'component/common/Table/cells/HighlightCell/HighlightCell'; import { HighlightCell } from 'component/common/Table/cells/HighlightCell/HighlightCell';
export const ApiTokenTable = () => { export const ApiTokenTable = () => {
const { tokens } = useApiTokens(); const { tokens, loading } = useApiTokens();
const hiddenColumns = useHiddenColumns(); const hiddenColumns = useHiddenColumns();
const initialState = useMemo(() => ({ sortBy: [{ id: 'createdAt' }] }), []); const initialState = useMemo(() => ({ sortBy: [{ id: 'createdAt' }] }), []);
@ -69,10 +69,6 @@ export const ApiTokenTable = () => {
</> </>
); );
if (!tokens.length) {
return null;
}
return ( return (
<PageContent <PageContent
header={ header={
@ -105,7 +101,7 @@ export const ApiTokenTable = () => {
</Table> </Table>
</SearchHighlightProvider> </SearchHighlightProvider>
<ConditionallyRender <ConditionallyRender
condition={rows.length === 0} condition={rows.length === 0 && !loading}
show={ show={
<ConditionallyRender <ConditionallyRender
condition={globalFilter?.length > 0} condition={globalFilter?.length > 0}