Conditionally show no items (#10065)

* Conditionally show no items

* Clean up view
This commit is contained in:
Nicolas Mowen 2024-02-26 13:47:20 -07:00 committed by GitHub
parent 3c5ed474af
commit 20578de9d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,8 +91,8 @@ export default function DesktopEventView({
return false; return false;
} }
return contentRef.current.scrollHeight > contentRef.current.clientHeight return contentRef.current.scrollHeight > contentRef.current.clientHeight;
}, [contentRef.current?.scrollHeight]) }, [contentRef.current?.scrollHeight]);
// review interaction // review interaction
@ -276,10 +276,12 @@ export default function DesktopEventView({
</div> </div>
)} )}
<div className="absolute w-full h-full flex flex-col justify-center items-center"> {reachedEnd && currentItems == null && (
<LuFolderCheck className="w-16 h-16" /> <div className="w-full h-full flex flex-col justify-center items-center">
There are no {severity} items to review <LuFolderCheck className="w-16 h-16" />
</div> There are no {severity} items to review
</div>
)}
<div className="w-full mr-4 md:grid md:grid-cols-3 3xl:grid-cols-4 gap-4"> <div className="w-full mr-4 md:grid md:grid-cols-3 3xl:grid-cols-4 gap-4">
{currentItems ? ( {currentItems ? (