diff --git a/src/UserMenu.jsx b/src/UserMenu.jsx index 3e9f7354..6363948c 100644 --- a/src/UserMenu.jsx +++ b/src/UserMenu.jsx @@ -13,7 +13,7 @@ import { useLocation } from "react-router-dom"; import { Body } from "./typography/Typography"; export function UserMenu({ - disableLogout, + preventNavigation, isAuthenticated, isPasswordlessUser, displayName, @@ -32,7 +32,7 @@ export function UserMenu({ label: displayName, }); - if (isPasswordlessUser) { + if (isPasswordlessUser && !preventNavigation) { arr.push({ key: "login", label: "Sign In", @@ -40,7 +40,7 @@ export function UserMenu({ }); } - if (!isPasswordlessUser && !disableLogout) { + if (!isPasswordlessUser && !preventNavigation) { arr.push({ key: "logout", label: "Sign Out", @@ -50,7 +50,7 @@ export function UserMenu({ } return arr; - }, [isAuthenticated, isPasswordlessUser, displayName, disableLogout]); + }, [isAuthenticated, isPasswordlessUser, displayName, preventNavigation]); if (!isAuthenticated) { return ( diff --git a/src/UserMenuContainer.jsx b/src/UserMenuContainer.jsx index b4af921f..eecb657e 100644 --- a/src/UserMenuContainer.jsx +++ b/src/UserMenuContainer.jsx @@ -6,7 +6,7 @@ import { useModalTriggerState } from "./Modal"; import { ProfileModal } from "./profile/ProfileModal"; import { UserMenu } from "./UserMenu"; -export function UserMenuContainer({ disableLogout }) { +export function UserMenuContainer({ preventNavigation }) { const location = useLocation(); const history = useHistory(); const { isAuthenticated, isPasswordlessUser, logout, userName, client } = @@ -34,7 +34,7 @@ export function UserMenuContainer({ disableLogout }) { return ( <> - + {items.length === 0 ? ( diff --git a/src/room/RoomAuthView.jsx b/src/room/RoomAuthView.jsx index 7728639c..4cb43796 100644 --- a/src/room/RoomAuthView.jsx +++ b/src/room/RoomAuthView.jsx @@ -49,7 +49,7 @@ export function RoomAuthView() { - +