From d493b957821c8c647cc5b3678f0e04f7e7dd8328 Mon Sep 17 00:00:00 2001 From: Robert Long Date: Fri, 17 Dec 2021 11:27:33 -0800 Subject: [PATCH] Remove register menu item --- src/UserMenu.jsx | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/UserMenu.jsx b/src/UserMenu.jsx index f67742a4..e40b89b7 100644 --- a/src/UserMenu.jsx +++ b/src/UserMenu.jsx @@ -40,9 +40,6 @@ export function UserMenu({ disableLogout }) { case "login": history.push("/login", { state: { from: location } }); break; - case "register": - history.push("/register", { state: { from: location } }); - break; } }, [history, location, logout, modalState] @@ -60,19 +57,14 @@ export function UserMenu({ disableLogout }) { } if (!isAuthenticated || isGuest || isPasswordlessUser) { - arr.push( - { - key: "login", - label: "Sign In", - icon: LoginIcon, - }, - { - key: "register", - label: "Register", - icon: LoginIcon, - } - ); - } else if (!disableLogout) { + arr.push({ + key: "login", + label: "Sign In", + icon: LoginIcon, + }); + } + + if (isAuthenticated && !isGuest && !isPasswordlessUser && !disableLogout) { arr.push({ key: "logout", label: "Sign Out",