File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
typescript-sdk/apps/dojo/src/components/layout Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,14 @@ import React, { useState } from "react";
4
4
import { ViewerLayout } from "@/components/layout/viewer-layout" ;
5
5
import { Sidebar } from "@/components/sidebar/sidebar" ;
6
6
7
- import { usePathname } from "next/navigation" ;
7
+ import { usePathname , useSearchParams } from "next/navigation" ;
8
8
import featureConfig from "@/config" ;
9
9
10
10
export function MainLayout ( { children } : { children : React . ReactNode } ) {
11
11
const pathname = usePathname ( ) ;
12
+ const searchParams = useSearchParams ( ) ;
13
+
14
+ const sidebarDisabled = searchParams . get ( "sidebar" ) === "disabled" ;
12
15
13
16
// Extract the current demo ID from the pathname
14
17
const pathParts = pathname . split ( "/" ) ;
@@ -19,7 +22,7 @@ export function MainLayout({ children }: { children: React.ReactNode }) {
19
22
< ViewerLayout showFileTree = { false } showCodeEditor = { false } >
20
23
< div className = "flex h-full w-full overflow-hidden" >
21
24
{ /* Sidebar */ }
22
- < Sidebar activeTab = { "preview" } readmeContent = { "" } />
25
+ { ! sidebarDisabled && < Sidebar activeTab = { "preview" } readmeContent = { "" } /> }
23
26
24
27
{ /* Content */ }
25
28
< div className = "flex-1 overflow-auto" >
You can’t perform that action at this time.
0 commit comments