mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-10 23:11:01 +00:00
UI - renamed authOn to isAuthOn
This commit is contained in:
parent
7dc9df425d
commit
c91e7dc8de
2 changed files with 5 additions and 5 deletions
|
|
@ -16,7 +16,7 @@ const App = () => {
|
|||
<div></div>
|
||||
) : (
|
||||
<MuiThemeProvider theme={lightTheme}>
|
||||
{auth.authOn ? (
|
||||
{auth.isAuthOn ? (
|
||||
<Switch>
|
||||
<Route
|
||||
exact
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ function useProvideAuth() {
|
|||
const [user, setUser] = useState<IUser | undefined>(undefined);
|
||||
const [isAuthenticated, setIsAuthenticated] = useState<boolean>(false);
|
||||
const [isLoading, setIsLoading] = useState<boolean>(true);
|
||||
const [authOn, setAuthOn] = useState<boolean>(true);
|
||||
const [isAuthOn, setIsAuthOn] = useState<boolean>(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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue