Fix typo
authormarcin mikołajczak <git@mkljczk.pl>
Tue, 14 Sep 2021 07:30:37 +0000 (09:30 +0200)
committermarcin mikołajczak <git@mkljczk.pl>
Tue, 14 Sep 2021 07:30:37 +0000 (09:30 +0200)
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
src/app/pages/App.jsx
src/client/state/auth.js

index 0df840dbb8ba89e47c02b58a8cd0e4225e72fa08..bb26505609efed7757386c8a9d3015dd82c2eaac 100644 (file)
@@ -3,7 +3,7 @@ import {
   BrowserRouter, Switch, Route, Redirect,
 } from 'react-router-dom';
 
-import { isAuthanticated } from '../../client/state/auth';
+import { isAuthenticated } from '../../client/state/auth';
 
 import Auth from '../templates/auth/Auth';
 import Client from '../templates/client/Client';
@@ -13,13 +13,13 @@ function App() {
     <BrowserRouter>
       <Switch>
         <Route exact path="/">
-          { isAuthanticated() ? <Client /> : <Redirect to="/login" />}
+          { isAuthenticated() ? <Client /> : <Redirect to="/login" />}
         </Route>
         <Route path="/login">
-          { isAuthanticated() ? <Redirect to="/" /> : <Auth type="login" />}
+          { isAuthenticated() ? <Redirect to="/" /> : <Auth type="login" />}
         </Route>
         <Route path="/register">
-          { isAuthanticated() ? <Redirect to="/" /> : <Auth type="register" />}
+          { isAuthenticated() ? <Redirect to="/" /> : <Auth type="register" />}
         </Route>
       </Switch>
     </BrowserRouter>
index c919f6404ddbd22141d097ac4809e4317dc505b4..fbc23f6f4f384a7b4bce13af1bcae0f76abe4914 100644 (file)
@@ -4,7 +4,7 @@ function getSecret(key) {
   return localStorage.getItem(key);
 }
 
-const isAuthanticated = () => getSecret(cons.secretKey.ACCESS_TOKEN) !== null;
+const isAuthenticated = () => getSecret(cons.secretKey.ACCESS_TOKEN) !== null;
 
 const secret = {
   accessToken: getSecret(cons.secretKey.ACCESS_TOKEN),
@@ -14,6 +14,6 @@ const secret = {
 };
 
 export {
-  isAuthanticated,
+  isAuthenticated,
   secret,
 };