fix: include canPersist in DrawIoEmbed key for proper remount

Address review comments: canPersist is set async after mount, so DrawIoEmbed
needs to remount when it resolves to apply correct configuration and URL params.
This commit is contained in:
dayuan.jiang
2026-01-27 09:38:35 +09:00
parent c5de1a16ad
commit 76487fb7ea

View File

@@ -194,7 +194,7 @@ export default function Home() {
className={`h-full w-full ${isDrawioReady ? "" : "invisible absolute inset-0"}`}
>
<DrawIoEmbed
key={`${drawioUi}-${darkMode}-${currentLang}-${isElectron}`}
key={`${drawioUi}-${darkMode}-${currentLang}-${isElectron}-${canPersist}`}
ref={drawioRef}
autosave
onAutoSave={handleDrawioAutoSave}