Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Sidebar: pages open without a reload on wide screens

Claudeda3dd8fe2b7e
diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx
index c6a290b1..2e504f54 100644
--- a/src/components/app-sidebar.tsx
+++ b/src/components/app-sidebar.tsx
@@ -401,10 +401,12 @@ function ViewerRowPlaceholder() {
*/
function ViewerRow() {
const viewer = useViewer().data;
+ // This boundary can hydrate after the viewer query resolved: its first render keeps the server's placeholder.
+ const hydrated = useHydrated();
const pathname = usePathname();
const search = useSearchParams().toString();
const here = search ? `${pathname}?${search}` : pathname;
- const kind = !viewer ? undefined : viewer.owner ? "owner" : viewer.account ? "account" : viewer.publicSignup ? "guest" : "owner";
+ const kind = !viewer || !hydrated ? undefined : viewer.owner ? "owner" : viewer.account ? "account" : viewer.publicSignup ? "guest" : "owner";
useEffect(() => {
if (!kind) return;
try {