change spinner to visibility hidden after chart loads

This commit is contained in:
Henry Dollman
2024-11-12 18:25:27 -05:00
parent 6043c59da8
commit e87af81db4
2 changed files with 11 additions and 4 deletions

View File

@@ -656,8 +656,14 @@ function ChartCard({
<CardDescription>{description}</CardDescription>
{cornerEl && <div className="relative py-1 block sm:w-44 sm:absolute sm:top-2.5 sm:end-3.5">{cornerEl}</div>}
</CardHeader>
<div className="ps-0 w-[calc(100%-1.5em)] h-48 md:h-52 relative">
{<Spinner msg={empty ? t`Waiting for enough records to display` : undefined} />}
<div className="ps-0 w-[calc(100%-1.5em)] h-48 md:h-52 relative group">
{
<Spinner
msg={empty ? t`Waiting for enough records to display` : undefined}
// className="group-has-[.opacity-100]:opacity-0 transition-opacity"
className="group-has-[.opacity-100]:invisible duration-100"
/>
}
{isIntersecting && children}
</div>
</Card>