Fix SSR and automerge timing
SSR fix: - ClientOnly wrapper prevents Leaflet/Yjs from running during SSR - SessionView lazy-loaded to avoid browser API usage on server Automerge fix: - Set MERGE_READY_STATE to 'clean' only (was including 'unstable') - Prevents merging before all CI checks complete Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e0cce17b8d
commit
e40b7dc199
4 changed files with 96 additions and 45 deletions
17
apps/planner/app/components/ClientOnly.tsx
Normal file
17
apps/planner/app/components/ClientOnly.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { useState, useEffect, type ReactNode } from "react";
|
||||
|
||||
export function ClientOnly({
|
||||
children,
|
||||
fallback = null,
|
||||
}: {
|
||||
children: () => ReactNode;
|
||||
fallback?: ReactNode;
|
||||
}) {
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setMounted(true);
|
||||
}, []);
|
||||
|
||||
return mounted ? <>{children()}</> : <>{fallback}</>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue