updated dependecies, added context, axios config

This commit is contained in:
Ben Elferink
2021-03-13 17:46:51 +02:00
parent a895cc0647
commit bc37d68394
19 changed files with 39144 additions and 509 deletions

View File

@@ -1,9 +1,28 @@
import './styles/styles.css';
import { useAuth } from './contexts/AuthContext';
export default function App() {
const { isLoggedIn } = useAuth();
return (
<div className='App'>
<p>Hello World - React.js</p>
<h1>{isLoggedIn ? <LoggedInText /> : <LoggedOutText />}</h1>
</div>
);
}
const LoggedInText = () => (
<>
You are (not really) logged in,
<br />
check your console.log()
</>
);
const LoggedOutText = () => (
<>
Don't forget to start your backend server,
<br />
then hit refresh and see what happens...
</>
);