Remove register menu item
This commit is contained in:
@@ -40,9 +40,6 @@ export function UserMenu({ disableLogout }) {
|
|||||||
case "login":
|
case "login":
|
||||||
history.push("/login", { state: { from: location } });
|
history.push("/login", { state: { from: location } });
|
||||||
break;
|
break;
|
||||||
case "register":
|
|
||||||
history.push("/register", { state: { from: location } });
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[history, location, logout, modalState]
|
[history, location, logout, modalState]
|
||||||
@@ -60,19 +57,14 @@ export function UserMenu({ disableLogout }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isAuthenticated || isGuest || isPasswordlessUser) {
|
if (!isAuthenticated || isGuest || isPasswordlessUser) {
|
||||||
arr.push(
|
arr.push({
|
||||||
{
|
key: "login",
|
||||||
key: "login",
|
label: "Sign In",
|
||||||
label: "Sign In",
|
icon: LoginIcon,
|
||||||
icon: LoginIcon,
|
});
|
||||||
},
|
}
|
||||||
{
|
|
||||||
key: "register",
|
if (isAuthenticated && !isGuest && !isPasswordlessUser && !disableLogout) {
|
||||||
label: "Register",
|
|
||||||
icon: LoginIcon,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else if (!disableLogout) {
|
|
||||||
arr.push({
|
arr.push({
|
||||||
key: "logout",
|
key: "logout",
|
||||||
label: "Sign Out",
|
label: "Sign Out",
|
||||||
|
|||||||
Reference in New Issue
Block a user