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:
@@ -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>
|
||||
) : (
|
||||
|
||||
Reference in New Issue
Block a user