Don't show spinner on no accounts (#3460)

This commit is contained in:
Jaco Greeff 2020-08-21 08:32:00 +02:00 committed by GitHub
parent 776951d96a
commit afb742e895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -170,6 +170,17 @@ export default React.memo(styled(Menu)`
&.menuBg,
.menuBg {
&:before {
background; #fff;
bottom: 0;
content: ' ';
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: -2;
}
&:before {
bottom: 0;
content: ' ';

View File

@ -61,7 +61,7 @@ async function queryLedger (): Promise<void> {
function Overview ({ className = '', onStatusChange }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const { api } = useApi();
const { allAccounts } = useAccounts();
const { allAccounts, hasAccounts } = useAccounts();
const { isIpfs } = useIpfs();
const [isCreateOpen, toggleCreate] = useToggle();
const [isImportOpen, toggleImport] = useToggle();
@ -244,7 +244,7 @@ function Overview ({ className = '', onStatusChange }: Props): React.ReactElemen
/>
</Button.Group>
<Table
empty={!isLoading && sortedAccountsWithDelegation && t<string>("You don't have any accounts. Some features are currently hidden and will only become available once you have accounts.")}
empty={(!hasAccounts || (!isLoading && sortedAccountsWithDelegation)) && t<string>("You don't have any accounts. Some features are currently hidden and will only become available once you have accounts.")}
filter={filter}
footer={footer}
header={headerRef.current}