diff --git a/src/components/Auth.jsx b/src/components/Auth.jsx
index 859e77c..bfc0404 100644
--- a/src/components/Auth.jsx
+++ b/src/components/Auth.jsx
@@ -5,8 +5,8 @@ import queryString from "query-string";
import {auth, logout} from "../services/auth_service";
import {useStateValue} from "../services/State";
-export const AuthMiddleware = (props) => {
- const match = useRouteMatch('*')
+export const AuthMiddleware = () => {
+ useRouteMatch('*');
return null;
}
@@ -20,8 +20,6 @@ export const AuthLogin = (props) => {
const params = queryString.parse(props.location.search);
auth(params).then((response) => {
- console.debug(response, window.localStorage);
-
if(response.status === 'redirect_to_code'){
// Se va o ya se redirigió hacia la pagina que obtiene el código, no hay nada que hacer.
return null;
@@ -42,16 +40,16 @@ export const AuthLogin = (props) => {
return null;
}
-export const AuthLogout = (props) => {
+export const AuthLogout = () => {
const [context, dispatch] = useStateValue();
+
if (!context.user.auth) {
- return
+ return ;
}
- logout(context.user.access_token).then(result => {
- console.log(result);
+ logout(context.user.access_token).then(() => {
+ dispatch({type: 'logout', user: {auth: false}})
});
- dispatch({type: 'logout', user: {auth: false}})
- return
+ return ;
}
diff --git a/src/components/Comments.jsx b/src/components/Comments.jsx
index b7ef58b..db06eab 100644
--- a/src/components/Comments.jsx
+++ b/src/components/Comments.jsx
@@ -6,14 +6,14 @@ import Faker from 'faker';
import './Comments.scss'
const Comment = (props) => (
-
{props.text}
-