Fix displaying wrong backup number on pages

By having multiplie pages the current number of backups broke
This commit is contained in:
mammut53 2021-03-07 01:57:02 +01:00 committed by GitHub
parent 0baa74a517
commit 8dca2140b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,12 +65,12 @@ const BackupContainer = () => {
} }
<Can action={'backup.create'}> <Can action={'backup.create'}>
<div css={tw`mt-6 sm:flex items-center justify-end`}> <div css={tw`mt-6 sm:flex items-center justify-end`}>
{(backupLimit > 0 && backups.items.length > 0) && {(backupLimit > 0 && backups.pagination.total > 0) &&
<p css={tw`text-sm text-neutral-300 mb-4 sm:mr-6 sm:mb-0`}> <p css={tw`text-sm text-neutral-300 mb-4 sm:mr-6 sm:mb-0`}>
{backups.items.length} of {backupLimit} backups have been created for this server. {backups.pagination.total} of {backupLimit} backups have been created for this server.
</p> </p>
} }
{backupLimit > 0 && backupLimit !== backups.items.length && {backupLimit > 0 && backupLimit !== backups.pagination.total &&
<CreateBackupButton css={tw`w-full sm:w-auto`}/> <CreateBackupButton css={tw`w-full sm:w-auto`}/>
} }
</div> </div>