Remove logout item for passwordless user
This commit is contained in:
parent
3fd90915d8
commit
81144a7421
1 changed files with 9 additions and 2 deletions
|
|
@ -16,7 +16,14 @@ import { Tooltip, TooltipTrigger } from "./Tooltip";
|
||||||
export function UserMenu({ disableLogout }) {
|
export function UserMenu({ disableLogout }) {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const { isAuthenticated, isGuest, logout, userName, client } = useClient();
|
const {
|
||||||
|
isAuthenticated,
|
||||||
|
isGuest,
|
||||||
|
isPasswordlessUser,
|
||||||
|
logout,
|
||||||
|
userName,
|
||||||
|
client,
|
||||||
|
} = useClient();
|
||||||
const { displayName } = useDisplayName(client);
|
const { displayName } = useDisplayName(client);
|
||||||
const { modalState, modalProps } = useModalTriggerState();
|
const { modalState, modalProps } = useModalTriggerState();
|
||||||
|
|
||||||
|
|
@ -51,7 +58,7 @@ export function UserMenu({ disableLogout }) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isAuthenticated || isGuest) {
|
if (!isAuthenticated || isGuest || isPasswordlessUser) {
|
||||||
arr.push(
|
arr.push(
|
||||||
{
|
{
|
||||||
key: "login",
|
key: "login",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue