fixed submitting form
This commit is contained in:
@@ -7,9 +7,8 @@ import { getAll25 } from "./frontend.data.js";
|
||||
|
||||
router.post("/frontend", async (req, res) => {
|
||||
console.log(req.body);
|
||||
const data = await getAll25();
|
||||
console.log(data);
|
||||
res.status(200);
|
||||
// 204 = "No Content"; beendet die Response sauber ohne Body
|
||||
res.sendStatus(204);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -204,16 +204,9 @@ export const MainForm = () => {
|
||||
<FormControlLabel control={<Checkbox />} label={t("transfer")} />
|
||||
<TextField required id="code" label={t("code")} variant="filled" />
|
||||
{isLoading && <CircularProgress />}
|
||||
<button type="submit">
|
||||
<Button
|
||||
onClick={() => {
|
||||
handleSubmit();
|
||||
}}
|
||||
variant="contained"
|
||||
>
|
||||
<Button type="submit" variant="contained" disabled={isLoading}>
|
||||
{t("submit")}
|
||||
</Button>
|
||||
</button>
|
||||
|
||||
{msg && (
|
||||
<Alert severity={msg.type}>
|
||||
|
||||
Reference in New Issue
Block a user