fix: skip skeleton when SWR has cached data + lazy-load Map and Globe

This commit is contained in:
Usman Baig
2026-03-10 00:32:07 +01:00
parent 01f6d8d065
commit 4babbc7555
2 changed files with 7 additions and 3 deletions

View File

@@ -416,7 +416,9 @@ export default function SiteDashboardPage() {
if (site?.domain) document.title = `${site.domain} | Pulse`
}, [site?.domain])
const showSkeleton = useMinimumLoading(overviewLoading)
// Skip the minimum-loading skeleton when SWR already has cached data
// (prevents the 300ms flash when navigating back to the dashboard)
const showSkeleton = useMinimumLoading(overviewLoading && !overview)
if (showSkeleton) {
return <DashboardSkeleton />