Some cleaning
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user