REFACTOR frontend

This commit is contained in:
2025-05-30 14:43:53 +02:00
parent fdaef02ef9
commit 1802659f43
8 changed files with 51 additions and 36 deletions

View File

@@ -2,6 +2,7 @@ import {useState} from "react";
import {useNavigate} from "react-router-dom";
import { uploadFile } from "../utils/endpoints"
import BlueButton from "../components/buttons/BlueButton.tsx";
import Box from "../components/Box.tsx";
const clipUpload = () => {
const [file, setFile] = useState<File | null>(null);
@@ -19,7 +20,7 @@ const clipUpload = () => {
});
return (
<div className={"flex flex-col justify-between gap-3"}>
<Box className={"flex flex-col justify-between gap-3 p-5"}>
<input
type="file"
onChange={(e) => {
@@ -30,14 +31,14 @@ const clipUpload = () => {
/>
<BlueButton
onClick={press}
>Upload</BlueButton>
onClick={press}>
Upload
</BlueButton>
{noFileError &&
<label className={"text-center text-red-500"}>Please choose a file</label>
}
</div>
</Box>
)
};