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" />
|
<GitHubLogoIcon className="w-4 h-4" />
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
<SettingsDropdown isAuthEnabled={env.SOURCEBOT_AUTH_ENABLED === 'true'} />
|
<SettingsDropdown displaySettingsOption={env.SOURCEBOT_AUTH_ENABLED === 'true'} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Separator />
|
<Separator />
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,12 @@ import { useDomain } from "@/hooks/useDomain";
|
||||||
|
|
||||||
interface SettingsDropdownProps {
|
interface SettingsDropdownProps {
|
||||||
menuButtonClassName?: string;
|
menuButtonClassName?: string;
|
||||||
isAuthEnabled: boolean;
|
displaySettingsOption: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SettingsDropdown = ({
|
export const SettingsDropdown = ({
|
||||||
menuButtonClassName,
|
menuButtonClassName,
|
||||||
isAuthEnabled,
|
displaySettingsOption,
|
||||||
}: SettingsDropdownProps) => {
|
}: SettingsDropdownProps) => {
|
||||||
|
|
||||||
const { theme: _theme, setTheme } = useTheme();
|
const { theme: _theme, setTheme } = useTheme();
|
||||||
|
|
@ -150,7 +150,7 @@ export const SettingsDropdown = ({
|
||||||
</DropdownMenuSubContent>
|
</DropdownMenuSubContent>
|
||||||
</DropdownMenuPortal>
|
</DropdownMenuPortal>
|
||||||
</DropdownMenuSub>
|
</DropdownMenuSub>
|
||||||
{isAuthEnabled && (
|
{displaySettingsOption && (
|
||||||
<DropdownMenuItem asChild>
|
<DropdownMenuItem asChild>
|
||||||
<a href={`/${domain}/settings`}>
|
<a href={`/${domain}/settings`}>
|
||||||
<Settings className="h-4 w-4 mr-2" />
|
<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 logoDark from "@/public/sb_logo_dark.png";
|
||||||
import { SearchBar } from "./searchBar";
|
import { SearchBar } from "./searchBar";
|
||||||
import { SettingsDropdown } from "./settingsDropdown";
|
import { SettingsDropdown } from "./settingsDropdown";
|
||||||
import { env } from "@/env.mjs";
|
|
||||||
|
|
||||||
interface TopBarProps {
|
interface TopBarProps {
|
||||||
defaultSearchQuery?: string;
|
defaultSearchQuery?: string;
|
||||||
|
|
@ -41,7 +40,7 @@ export const TopBar = ({
|
||||||
</div>
|
</div>
|
||||||
<SettingsDropdown
|
<SettingsDropdown
|
||||||
menuButtonClassName="w-8 h-8"
|
menuButtonClassName="w-8 h-8"
|
||||||
isAuthEnabled={env.SOURCEBOT_AUTH_ENABLED === 'true'}
|
displaySettingsOption={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue