Remove unused components and files from the frontend, including Form4, Header, LoginForm, Object, Sidebar, and related utility functions. Clean up the project structure by deleting unnecessary CSS, TypeScript configuration files, and Vite configuration. This refactor aims to streamline the codebase and improve maintainability.
This commit is contained in:
@@ -1,6 +1,29 @@
|
||||
import { Box } from "@chakra-ui/react";
|
||||
import { useEffect } from "react";
|
||||
import { infoAtom } from "@/states/Atoms";
|
||||
import { useAtom } from "jotai";
|
||||
|
||||
const API_BASE =
|
||||
(import.meta as any).env?.VITE_BACKEND_URL ||
|
||||
import.meta.env.VITE_BACKEND_URL ||
|
||||
"http://localhost:8002";
|
||||
|
||||
export const Footer = () => {
|
||||
const [info, setInfo] = useAtom(infoAtom);
|
||||
|
||||
useEffect(() => {
|
||||
const metaData = async () => {
|
||||
const response = await fetch(`${API_BASE}/server-info`, {
|
||||
method: "GET",
|
||||
});
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
setInfo(data);
|
||||
}
|
||||
};
|
||||
metaData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Box
|
||||
as="footer"
|
||||
@@ -13,7 +36,8 @@ export const Footer = () => {
|
||||
>
|
||||
Made with ❤️ by Theis Gaedigk - Year 2019 at MCS-Bochum
|
||||
<br />
|
||||
v2.0
|
||||
Frontend-Version: {info ? info["frontend-info"].version : "N/A"} |
|
||||
Backend-Version: {info ? info["backend-info"].version : "N/A"}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user