mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
fix bug with env var read in client
This commit is contained in:
parent
39b92b9e98
commit
6b1d7ff8a4
3 changed files with 5 additions and 6 deletions
|
|
@ -124,7 +124,7 @@ export const NavigationMenu = async ({
|
|||
<GitHubLogoIcon className="w-4 h-4" />
|
||||
</Button>
|
||||
</form>
|
||||
<SettingsDropdown isAuthEnabled={env.SOURCEBOT_AUTH_ENABLED === 'true'} />
|
||||
<SettingsDropdown displaySettingsOption={env.SOURCEBOT_AUTH_ENABLED === 'true'} />
|
||||
</div>
|
||||
</div>
|
||||
<Separator />
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ import { useDomain } from "@/hooks/useDomain";
|
|||
|
||||
interface SettingsDropdownProps {
|
||||
menuButtonClassName?: string;
|
||||
isAuthEnabled: boolean;
|
||||
displaySettingsOption: boolean;
|
||||
}
|
||||
|
||||
export const SettingsDropdown = ({
|
||||
menuButtonClassName,
|
||||
isAuthEnabled,
|
||||
displaySettingsOption,
|
||||
}: SettingsDropdownProps) => {
|
||||
|
||||
const { theme: _theme, setTheme } = useTheme();
|
||||
|
|
@ -150,7 +150,7 @@ export const SettingsDropdown = ({
|
|||
</DropdownMenuSubContent>
|
||||
</DropdownMenuPortal>
|
||||
</DropdownMenuSub>
|
||||
{isAuthEnabled && (
|
||||
{displaySettingsOption && (
|
||||
<DropdownMenuItem asChild>
|
||||
<a href={`/${domain}/settings`}>
|
||||
<Settings className="h-4 w-4 mr-2" />
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import logoLight from "@/public/sb_logo_light.png";
|
|||
import logoDark from "@/public/sb_logo_dark.png";
|
||||
import { SearchBar } from "./searchBar";
|
||||
import { SettingsDropdown } from "./settingsDropdown";
|
||||
import { env } from "@/env.mjs";
|
||||
|
||||
interface TopBarProps {
|
||||
defaultSearchQuery?: string;
|
||||
|
|
@ -41,7 +40,7 @@ export const TopBar = ({
|
|||
</div>
|
||||
<SettingsDropdown
|
||||
menuButtonClassName="w-8 h-8"
|
||||
isAuthEnabled={env.SOURCEBOT_AUTH_ENABLED === 'true'}
|
||||
displaySettingsOption={false}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue