mirror of
https://github.com/strapi/strapi.git
synced 2025-12-28 07:33:17 +00:00
fix: Update ContentLayout in TransferTokens
This commit is contained in:
parent
b358b1b490
commit
6db1de120f
@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
|
||||
import { Button, ContentLayout, HeaderLayout, Main } from '@strapi/design-system';
|
||||
import { ContentLayout, HeaderLayout, Main } from '@strapi/design-system';
|
||||
import {
|
||||
LinkButton,
|
||||
NoContent,
|
||||
@ -136,9 +136,10 @@ const TransferTokenListView = () => {
|
||||
}
|
||||
);
|
||||
|
||||
const shouldDisplayDynamicTable = canRead && transferTokens;
|
||||
const shouldDisplayNoContent = canRead && !transferTokens && !canCreate;
|
||||
const shouldDisplayNoContentWithCreationButton = canRead && !transferTokens && canCreate;
|
||||
const hasTransferTokens = transferTokens && transferTokens?.length > 0;
|
||||
const shouldDisplayDynamicTable = canRead && hasTransferTokens;
|
||||
const shouldDisplayNoContent = canRead && !hasTransferTokens && !canCreate;
|
||||
const shouldDisplayNoContentWithCreationButton = canRead && !hasTransferTokens && canCreate;
|
||||
|
||||
return (
|
||||
<Main aria-busy={isLoading}>
|
||||
@ -194,12 +195,16 @@ const TransferTokenListView = () => {
|
||||
defaultMessage: 'Add your first Transfer Token',
|
||||
}}
|
||||
action={
|
||||
<Button variant="secondary" startIcon={<Plus />}>
|
||||
<LinkButton
|
||||
variant="secondary"
|
||||
startIcon={<Plus />}
|
||||
to="/settings/transfer-tokens/create"
|
||||
>
|
||||
{formatMessage({
|
||||
id: 'Settings.transferTokens.addNewToken',
|
||||
defaultMessage: 'Add new Transfer Token',
|
||||
})}
|
||||
</Button>
|
||||
</LinkButton>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user