feat(ui): replace skeleton loaders with honest loading states

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-21 13:40:58 -05:00
parent 0ee4416077
commit 17037e4936
41 changed files with 101 additions and 275 deletions

View File

@@ -2,7 +2,7 @@ import { RouterProvider, createRouter } from '@tanstack/react-router'
import { useEffect, useState } from 'react'
import { routeTree } from './routeTree.gen'
import { useAuth } from './lib/auth'
import { Skeleton } from './components/ui/skeleton'
import { LoadingText } from './components/ui/skeleton'
const router = createRouter({
routeTree,
@@ -24,17 +24,13 @@ function AppInner() {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
// Only show skeleton during initial auth check -- NOT on subsequent isLoading changes.
// Only show loading text during initial auth check -- NOT on subsequent isLoading changes.
// Reacting to isLoading here would unmount the entire router tree (including LoginPage)
// every time an auth action sets isLoading, destroying all component local state.
if (!hasChecked) {
return (
<div className="flex items-center justify-center min-h-screen bg-background">
<div className="space-y-4 w-64">
<Skeleton className="h-8 w-48 mx-auto" />
<Skeleton className="h-4 w-full" />
<Skeleton className="h-4 w-3/4" />
</div>
<LoadingText />
</div>
)
}