Optional proxy in config (#11973)

This commit is contained in:
Josh Hawkins 2024-06-15 07:01:19 -06:00 committed by GitHub
parent 15e2df1e5c
commit 5617fbbcb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,7 @@ type AccountSettingsProps = {
export default function AccountSettings({ className }: AccountSettingsProps) { export default function AccountSettings({ className }: AccountSettingsProps) {
const { data: profile } = useSWR("profile"); const { data: profile } = useSWR("profile");
const { data: config } = useSWR("config"); const { data: config } = useSWR("config");
const logoutUrl = config?.proxy.logout_url || "/api/logout"; const logoutUrl = config?.proxy?.logout_url || "/api/logout";
const Container = isDesktop ? DropdownMenu : Drawer; const Container = isDesktop ? DropdownMenu : Drawer;
const Trigger = isDesktop ? DropdownMenuTrigger : DrawerTrigger; const Trigger = isDesktop ? DropdownMenuTrigger : DrawerTrigger;