From 179aa6ebfab2a85c59a251d7bf08988076a51732 Mon Sep 17 00:00:00 2001
From: MrFry
Date: Wed, 8 Apr 2020 18:12:08 +0200
Subject: [PATCH] Sending cookies with fetch, bg color change
---
src/components/subjectView.module.css | 2 +-
src/defaultStyles.css | 4 ++--
src/pages/_document.js | 2 +-
src/pages/index.js | 4 +++-
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/components/subjectView.module.css b/src/components/subjectView.module.css
index d33ac33..d029668 100644
--- a/src/components/subjectView.module.css
+++ b/src/components/subjectView.module.css
@@ -2,7 +2,7 @@
margin: 10px;
padding: 10px;
color: white;
- background-color: #212127;
+ background-color: #222426;
border: none;
font-size: 18px;
flex-grow: 1;
diff --git a/src/defaultStyles.css b/src/defaultStyles.css
index 76445d9..badf246 100644
--- a/src/defaultStyles.css
+++ b/src/defaultStyles.css
@@ -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;
diff --git a/src/pages/_document.js b/src/pages/_document.js
index 3076cf6..5e43ea1 100644
--- a/src/pages/_document.js
+++ b/src/pages/_document.js
@@ -10,7 +10,7 @@ class MyDocument extends Document {
return (
-
+
diff --git a/src/pages/index.js b/src/pages/index.js
index 03574a7..e12fbc8 100644
--- a/src/pages/index.js
+++ b/src/pages/index.js
@@ -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()