diff --git a/packages/editor/src/components/viewer/viewer-scene-header.tsx b/packages/editor/src/components/viewer/viewer-scene-header.tsx index 686d1ac114..3823333e31 100644 --- a/packages/editor/src/components/viewer/viewer-scene-header.tsx +++ b/packages/editor/src/components/viewer/viewer-scene-header.tsx @@ -34,8 +34,9 @@ export type ViewerSceneHeaderProps = { owner?: { username?: string | null } | null onBack?: () => void /** Fallback destination when no `onBack` handler is supplied. Must already be - * sanitized by the caller. */ - backHref?: string + * sanitized by the caller. `null` shows no back arrow (an embedded viewer with + * nowhere to go back to). */ + backHref?: string | null /** Extra row under the project info (e.g. likes/fork actions). */ stats?: ReactNode } @@ -110,7 +111,7 @@ export const ViewerSceneHeader = ({ > - ) : ( + ) : backHref === null ? null : (