Some cleaning

This commit is contained in:
Riccardo
2021-08-16 10:08:43 +02:00
parent 959c6dbc33
commit 78db95aa5f
4 changed files with 24 additions and 35 deletions

View File

@@ -1,11 +1,11 @@
import React from 'react';
import { useHistory } from 'react-router';
// import { useHistory } from 'react-router';
import { Link, withRouter } from 'react-router-dom';
import { AUTH_TOKEN } from '../../constants';
// import { AUTH_TOKEN } from '../../constants';
const Header = () => {
const history = useHistory();
const authToken = localStorage.getItem(AUTH_TOKEN);
// const history = useHistory();
// const authToken = localStorage.getItem(AUTH_TOKEN);
return (
<div className="flex pa1 justify-between nowrap orange">
<div className="flex flex-fixed black">
@@ -17,7 +17,7 @@ const Header = () => {
<div className="flex flex-fixed">
<Link to="/create" className="ml1 no-underline black">New</Link>
</div>
<div className="flex flex-fixed">
{/* <div className="flex flex-fixed">
{authToken ? (
<div className="ml1 pointer black"
onClick={() => {
@@ -28,7 +28,7 @@ const Header = () => {
) : (
<Link to="/login" className="ml1 no-underline black">Login</Link>
)}
</div>
</div> */}
</div>
);
};

View File

@@ -15,7 +15,7 @@ import {
} from '@apollo/client';
const httpLink = createHttpLink({
uri: 'http://localhost:4000/djhb58fytkh476dk45yh49'
uri: 'http://localhost:4000/graphql'
});
const authLink = setContext((_, { headers }) => {