feat: improve navigation in footer

This commit is contained in:
julius 2025-02-17 23:06:18 +01:00
parent 9647e890f6
commit df94b151a6
Signed by: julius
GPG Key ID: C80A63E6A5FD7092
3 changed files with 15 additions and 5 deletions

View File

@ -1,6 +1,5 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { apiAuth, baseUrl, token } from "./api"; import { apiAuth } from "./api";
import useAuthContext from "./AuthContext";
//const debounce = <T extends (...args: any[]) => void>( //const debounce = <T extends (...args: any[]) => void>(
// func: T, // func: T,
@ -59,7 +58,6 @@ export default function Analysis() {
const [showControlPanel, setShowControlPanel] = useState(false); const [showControlPanel, setShowControlPanel] = useState(false);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const auth = useAuthContext();
// Function to generate and fetch the graph image // Function to generate and fetch the graph image
async function loadImage() { async function loadImage() {
setLoading(true); setLoading(true);
@ -68,7 +66,7 @@ export default function Analysis() {
setImage(data.image); setImage(data.image);
setLoading(false); setLoading(false);
}).catch((e) => { }).catch((e) => {
auth.doLogin(); console.log("best to just reload... ", e);
}) })
} }

View File

@ -19,6 +19,7 @@ body {
} }
footer { footer {
margin-top: 24px;
font-size: x-small; font-size: x-small;
} }
@ -208,6 +209,10 @@ button,
} }
.navbar { .navbar {
span {
padding: 4px;
}
button { button {
font-size: medium; font-size: medium;
margin: 4px 0.5%; margin: 4px 0.5%;

View File

@ -1,6 +1,13 @@
import { Link } from "react-router";
export default function Footer() { export default function Footer() {
return <footer> return <footer>
<p className="grey"> <div className="navbar">
<Link to="/" ><span>Form</span></Link>
<span>|</span>
<Link to="/analysis" ><span>Trainer Analysis</span></Link>
</div>
<p className="grey extra-margin">
something not working? something not working?
<br /> <br />
message <a href="https://t.me/x0124816">me</a>. message <a href="https://t.me/x0124816">me</a>.