File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
packages/web/src/app/[domain]/components Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export const NavigationMenu = async ({
124124 < GitHubLogoIcon className = "w-4 h-4" />
125125 </ Button >
126126 </ form >
127- < SettingsDropdown />
127+ < SettingsDropdown isAuthEnabled = { env . SOURCEBOT_AUTH_ENABLED === 'true' } />
128128 </ div >
129129 </ div >
130130 < Separator />
Original file line number Diff line number Diff line change @@ -37,10 +37,12 @@ import { useDomain } from "@/hooks/useDomain";
3737
3838interface SettingsDropdownProps {
3939 menuButtonClassName ?: string ;
40+ isAuthEnabled : boolean ;
4041}
4142
4243export const SettingsDropdown = ( {
4344 menuButtonClassName,
45+ isAuthEnabled,
4446} : SettingsDropdownProps ) => {
4547
4648 const { theme : _theme , setTheme } = useTheme ( ) ;
@@ -148,12 +150,14 @@ export const SettingsDropdown = ({
148150 </ DropdownMenuSubContent >
149151 </ DropdownMenuPortal >
150152 </ DropdownMenuSub >
151- < DropdownMenuItem asChild >
152- < a href = { `/${ domain } /settings` } >
153- < Settings className = "h-4 w-4 mr-2" />
154- < span > Settings</ span >
155- </ a >
156- </ DropdownMenuItem >
153+ { isAuthEnabled && (
154+ < DropdownMenuItem asChild >
155+ < a href = { `/${ domain } /settings` } >
156+ < Settings className = "h-4 w-4 mr-2" />
157+ < span > Settings</ span >
158+ </ a >
159+ </ DropdownMenuItem >
160+ ) }
157161 </ DropdownMenuGroup >
158162 < DropdownMenuSeparator />
159163 < div className = "px-2 py-1 text-sm text-muted-foreground" >
You can’t perform that action at this time.
0 commit comments