@@ -23,9 +23,10 @@ interface SidebarProps {
2323 activeTab ?: string ;
2424 onTabChange ?: ( tab : string ) => void ;
2525 readmeContent ?: string | null ;
26+ pickerDisabled ?: boolean ;
2627}
2728
28- export function Sidebar ( { activeTab = "preview" , onTabChange, readmeContent } : SidebarProps ) {
29+ export function Sidebar ( { activeTab = "preview" , onTabChange, readmeContent, pickerDisabled } : SidebarProps ) {
2930 const router = useRouter ( ) ;
3031 const pathname = usePathname ( ) ;
3132 const [ isDarkTheme , setIsDarkTheme ] = useState < boolean > ( false ) ;
@@ -105,30 +106,32 @@ export function Sidebar({ activeTab = "preview", onTabChange, readmeContent }: S
105106 { /* Controls Section */ }
106107 < div className = "p-4 border-b bg-background" >
107108 { /* Preview/Code Tabs */ }
108- < div className = "mb-1" >
109- < label className = "block text-sm font-medium text-muted-foreground mb-2" > View</ label >
110- < DropdownMenu >
111- < DropdownMenuTrigger asChild >
112- < Button variant = "outline" className = "w-full justify-between" >
113- { currentIntegration ? currentIntegration . name : "Select Integration" }
114- < ChevronDown className = "h-4 w-4 opacity-50" />
115- </ Button >
116- </ DropdownMenuTrigger >
117- < DropdownMenuContent className = "w-56" >
118- { menuIntegrations . map ( ( integration ) => (
119- < DropdownMenuItem
120- key = { integration . id }
121- onClick = { ( ) => {
122- router . push ( `/${ integration . id } ` ) ;
123- } }
124- className = "cursor-pointer"
125- >
126- < span > { integration . name } </ span >
127- </ DropdownMenuItem >
128- ) ) }
129- </ DropdownMenuContent >
130- </ DropdownMenu >
131- </ div >
109+ { ! pickerDisabled && (
110+ < div className = "mb-1" >
111+ < label className = "block text-sm font-medium text-muted-foreground mb-2" > View</ label >
112+ < DropdownMenu >
113+ < DropdownMenuTrigger asChild >
114+ < Button variant = "outline" className = "w-full justify-between" >
115+ { currentIntegration ? currentIntegration . name : "Select Integration" }
116+ < ChevronDown className = "h-4 w-4 opacity-50" />
117+ </ Button >
118+ </ DropdownMenuTrigger >
119+ < DropdownMenuContent className = "w-56" >
120+ { menuIntegrations . map ( ( integration ) => (
121+ < DropdownMenuItem
122+ key = { integration . id }
123+ onClick = { ( ) => {
124+ router . push ( `/${ integration . id } ` ) ;
125+ } }
126+ className = "cursor-pointer"
127+ >
128+ < span > { integration . name } </ span >
129+ </ DropdownMenuItem >
130+ ) ) }
131+ </ DropdownMenuContent >
132+ </ DropdownMenu >
133+ </ div >
134+ ) }
132135 </ div >
133136
134137 { /* Demo List */ }
0 commit comments