diff --git a/Website/App.tsx b/Website/App.tsx index a48b1ac..b3bb95b 100644 --- a/Website/App.tsx +++ b/Website/App.tsx @@ -1,17 +1,28 @@ -import React from 'react'; +import React, {ReactElement, useEffect} from 'react'; import Footer from "./modules/Footer"; import Search from "./modules/Search"; import Header from "./modules/Header"; export default function App(){ - // @ts-ignore - const content =
-
- -
+ const [content, setContent] = React.useState(); - return(content) + useEffect(() => { + setContent(

Testing connection to backend...

) + getData('http://127.0.0.1:6531/v2/Ping').then((result) => { + console.log(result); + if(result === null){ + setContent(

No connection to backend

); + }else{ + setContent() + } + }) + }, []); + + return(
+
+ {content} +
+
) } export function getData (uri: string) : Promise { diff --git a/Website/styles/index.css b/Website/styles/index.css index 79410bc..c72c606 100644 --- a/Website/styles/index.css +++ b/Website/styles/index.css @@ -20,6 +20,7 @@ body{ background-color: var(--background-color); font-family: "Inter", sans-serif; overflow-x: hidden; + color: var(--primary-color); } header {