fix: sent messages not appearing + add Lobby/Auth skeleton loaders
CI / Build & Quality Checks (push) Failing after 5m45s
CI / Build & Quality Checks (push) Failing after 5m45s
- Fix timelineSegments useMemo stale cache: the Perf-5 optimization used timeline.linkedTimelines as its only dep, but that reference never changes when events are added in-place; adding eventsLength as a dep makes it recompute on every new live event so the binary search always finds the new item - Add LobbySkeleton: shimmer placeholder for space lobby (header + hero + room list rows) shown while the Lobby chunk lazy-loads - Add AuthSkeleton: shimmer placeholder for auth pages (logo + server picker + form fields) shown while AuthLayout chunk lazy-loads - Wire both into Router.tsx fallback props Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@ import {
|
||||
redirect,
|
||||
} from 'react-router-dom';
|
||||
import { RoomSkeleton } from '../components/RoomSkeleton';
|
||||
import { LobbySkeleton } from '../components/LobbySkeleton';
|
||||
import { AuthSkeleton } from '../components/AuthSkeleton';
|
||||
|
||||
import { ClientConfig } from '../hooks/useClientConfig';
|
||||
import {
|
||||
@@ -124,7 +126,7 @@ export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize)
|
||||
return null;
|
||||
}}
|
||||
element={
|
||||
<React.Suspense fallback={null}>
|
||||
<React.Suspense fallback={<AuthSkeleton />}>
|
||||
<AuthLayout />
|
||||
<UnAuthRouteThemeManager />
|
||||
</React.Suspense>
|
||||
@@ -309,7 +311,7 @@ export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize)
|
||||
<Route
|
||||
path={_LOBBY_PATH}
|
||||
element={
|
||||
<React.Suspense fallback={null}>
|
||||
<React.Suspense fallback={<LobbySkeleton />}>
|
||||
<Lobby />
|
||||
</React.Suspense>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user