diff --git a/package.json b/package.json
index 7cde236..66eaf9f 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"test": "react-scripts test",
"eject": "react-scripts eject"
},
+ "proxy": "http://localhost:8080",
"eslintConfig": {
"extends": [
"react-app",
diff --git a/src/App.js b/src/App.js
index f9a933c..c19d8e9 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,3 +1,5 @@
+import React, {useEffect, useState} from 'react';
+
import './overrides.scss';
import "bootstrap/dist/js/bootstrap.bundle.min";
@@ -31,6 +33,7 @@ import Balkon from './Pages/Radio/Balkon';
import Linux from './Pages/Linux/Linux';
import Footer from './UI/Footer';
+import BasicPage from './Pages/BasicPage';
function App() {
@@ -60,6 +63,8 @@ function App() {
}>
}>
}>
+
+ }>
diff --git a/src/Pages/BasicPage.js b/src/Pages/BasicPage.js
new file mode 100644
index 0000000..93e033a
--- /dev/null
+++ b/src/Pages/BasicPage.js
@@ -0,0 +1,45 @@
+import React, {useState, useEffect} from 'react';
+
+import ScrollSpy from '../UI/ScrollSpy';
+
+const BasicPage = (props) => {
+ const [error, setError] = useState(null);
+ const [isLoaded, setIsLoaded] = useState(false);
+ const [items, setItems] = useState([]);
+
+ useEffect(() => {
+ fetch("http://localhost:8080/jsonapi/node/page/" + props.id)
+ .then(res => res.json())
+ .then(
+ (result) => {
+ setIsLoaded(true);
+ setItems(result);
+ },
+ (error) => {
+ setIsLoaded(true);
+ setError(error);
+ }
+ )
+ }, [])
+
+ if (error) {
+ return
Error: {error.message}
;
+ } else if (!isLoaded) {
+ return Loading...
;
+ } else {
+ console.log(items);
+ return (
+
+
+
+
+ {items['data']['attributes']['title']}
+
+
+
+
+ )
+ }
+}
+
+export default BasicPage;
\ No newline at end of file
diff --git a/src/UI/ScrollSpy.js b/src/UI/ScrollSpy.js
new file mode 100644
index 0000000..574162e
--- /dev/null
+++ b/src/UI/ScrollSpy.js
@@ -0,0 +1,16 @@
+import React from 'react';
+
+const ScrollSpy = () => {
+ return (
+
+ )
+}
+
+export default ScrollSpy;
+
+
+