feat: enhance dashboard and canvas components with improved state management and resizing logic
- Added client mount state to the dashboard to prevent premature interactions before the component is fully loaded. - Updated button disabling logic to ensure it reflects the component's readiness and user session state. - Introduced zIndex handling in canvas placement context for better node layering. - Enhanced asset and image nodes with improved resizing logic to maintain aspect ratios during adjustments. - Refactored node components to streamline rendering and improve performance during dynamic updates.
This commit is contained in:
@@ -104,7 +104,8 @@ export default function ConnectionBanner() {
|
||||
return showReconnected ? "reconnected" : "hidden";
|
||||
}
|
||||
|
||||
if (!isBrowserOnline) {
|
||||
// Streng `=== false`, damit kein undefined/SSR-Artefakt wie „offline“ wird.
|
||||
if (isBrowserOnline === false) {
|
||||
return "disconnected";
|
||||
}
|
||||
|
||||
@@ -121,6 +122,12 @@ export default function ConnectionBanner() {
|
||||
showReconnected,
|
||||
]);
|
||||
|
||||
// WebSocket/Convex-Verbindung gibt es im Browser; SSR soll keinen Banner rendern,
|
||||
// sonst weicht die Geschwister-Reihenfolge vom ersten Client-Render ab (Hydration).
|
||||
if (typeof window === "undefined") {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (bannerState === "hidden") {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user