mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
fix(frontend): show empty report only when not loading
This commit is contained in:
parent
fa2d1f426f
commit
79b375ca08
5 changed files with 10 additions and 10 deletions
|
|
@ -29,7 +29,7 @@ export const ReportTopGenres: React.FC = () => {
|
|||
|
||||
const { topGenres, isLoading } = useTopGenres(options);
|
||||
|
||||
const reportHasItems = !isLoading && topGenres.length !== 0;
|
||||
const reportHasItems = topGenres.length !== 0;
|
||||
|
||||
requireUser();
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ export const ReportTopGenres: React.FC = () => {
|
|||
<div className="loader rounded-full border-8 h-64 w-64"></div>
|
||||
</div>
|
||||
)}
|
||||
{!reportHasItems && (
|
||||
{!reportHasItems && !isLoading && (
|
||||
<div>
|
||||
<p>Report is emtpy! :(</p>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue