fix: allow recovering from part viewer error

Add a Try again button to the ErrorBoundary fallback and key the ModPage boundary by selection so picking another object clears a stuck error.
This commit is contained in:
2026-08-15 14:17:41 +08:00
parent 498cf1b633
commit cf8ca07850
2 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ export default function ModPage() {
{selected && Viewer ? (
/* Key by selection path so the Canvas remounts and the camera
refits to the newly selected object. */
<ErrorBoundary>
<ErrorBoundary key={selectedPath}>
<Suspense
fallback={
<div className="flex h-full items-center justify-center text-sm text-zinc-500">
@@ -61,7 +61,7 @@ export default function ModPage() {
</div>
}
>
<Viewer key={selectedPath} object={selected.object} fill />
<Viewer object={selected.object} fill />
</Suspense>
</ErrorBoundary>
) : (