@@ -102,17 +102,22 @@ async function main(): Promise<void> {
102102 const activeEntry = list . find ( e => e . stateKey === active . value ) ?? list [ 0 ]
103103 const spec = specs [ activeEntry . stateKey ]
104104
105+ // A single view renders on its own — no nav. The top bar (brand +
106+ // segmented view switcher) only appears once there's more than one.
107+ const multiple = list . length > 1
108+
105109 return h ( 'div' , { class : 'min-h-screen bg-base color-base font-sans' } , [
106- // Top bar: brand + (when >1) the shared segmented view switcher.
107- h ( 'div' , {
108- class : 'flex items-center gap-3 border-b border-base px5 h-nav' ,
109- } , [
110- h ( 'div' , { class : 'flex items-center gap-2 font-medium' } , [
111- h ( 'div' , { class : 'i-ph:layout-duotone color-primary text-lg' } ) ,
112- h ( 'span' , 'JSON Render' ) ,
113- ] ) ,
114- list . length > 1 ? h ( 'div' , { class : 'ml-auto' } , [ renderTabs ( list ) ] ) : null ,
115- ] ) ,
110+ multiple
111+ ? h ( 'div' , {
112+ class : 'flex items-center gap-3 border-b border-base px5 h-nav' ,
113+ } , [
114+ h ( 'div' , { class : 'flex items-center gap-2 font-medium' } , [
115+ h ( 'div' , { class : 'i-ph:layout-duotone color-primary text-lg' } ) ,
116+ h ( 'span' , 'JSON Render' ) ,
117+ ] ) ,
118+ h ( 'div' , { class : 'ml-auto' } , [ renderTabs ( list ) ] ) ,
119+ ] )
120+ : null ,
116121 h ( 'div' , { class : 'p6' } , [
117122 h ( JsonRenderView , {
118123 spec : spec ?? null ,
0 commit comments