From c91e7dc8de9f9caa3164dc86983f9400408e4ec2 Mon Sep 17 00:00:00 2001 From: Hoang Pham Date: Mon, 20 Dec 2021 12:28:38 -0600 Subject: [PATCH] UI - renamed authOn to isAuthOn --- lattice/src/App.tsx | 2 +- lattice/src/services/useAuth.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lattice/src/App.tsx b/lattice/src/App.tsx index 8481007b9..64454ebd5 100644 --- a/lattice/src/App.tsx +++ b/lattice/src/App.tsx @@ -16,7 +16,7 @@ const App = () => {
) : ( - {auth.authOn ? ( + {auth.isAuthOn ? ( (undefined); const [isAuthenticated, setIsAuthenticated] = useState(false); const [isLoading, setIsLoading] = useState(true); - const [authOn, setAuthOn] = useState(true); + const [isAuthOn, setIsAuthOn] = useState(true); const userinfo = () => { pilosa.get.userinfo().then((userinfoRes) => { @@ -58,10 +58,10 @@ function useProvideAuth() { .then((res) => { if (res.status === 204) { // Authentication is off - setAuthOn(false); + setIsAuthOn(false); } else { // Turn on Authentication - setAuthOn(true); + setIsAuthOn(true); if (res.data === "OK") { // User is authenticated @@ -83,8 +83,8 @@ function useProvideAuth() { return { isAuthenticated, isLoading, + isAuthOn, user, - authOn, userinfo, signin, signout,