Sending cookies with fetch, bg color change

This commit is contained in:
MrFry 2020-04-08 18:12:08 +02:00
parent 0ba12f4d67
commit 179aa6ebfa
4 changed files with 7 additions and 5 deletions

View file

@ -2,7 +2,7 @@
margin: 10px;
padding: 10px;
color: white;
background-color: #212127;
background-color: #222426;
border: none;
font-size: 18px;
flex-grow: 1;

View file

@ -1,7 +1,7 @@
:root {
--text-color: #9999ff;
--bright-color: #f2f2f2;
--background-color: #212127;
--background-color: #222426;
--hoover-color: #202020;
}
@ -28,7 +28,7 @@ a {
margin: 0;
padding: 0;
width: 200px;
background-color: #212127;
background-color: #222426;
position: fixed;
height: 100%;
overflow: auto;

View file

@ -10,7 +10,7 @@ class MyDocument extends Document {
return (
<Html>
<Head />
<body bgcolor='#212127'>
<body bgcolor='#222426'>
<Main />
<NextScript />
</body>

View file

@ -52,7 +52,9 @@ export default function Index (props) {
setData(null)
const toFetch = `${constants.apiUrl}data.json`
console.info('Fetching', toFetch)
fetch(toFetch)
fetch(toFetch, {
credentials: 'include'
})
.then((resp) => {
if (resp && resp.ok) {
return resp.json()