legal sachen, profil löschen etc

This commit is contained in:
2026-04-23 17:54:02 +02:00
parent 0b65dc5550
commit 5f5fcd2eef
11 changed files with 718 additions and 24 deletions

View File

@@ -2,7 +2,7 @@ import { useState } from 'react';
import { useNavigate, Link as RouterLink } from 'react-router-dom';
import {
Box, Card, CardContent, TextField, Button, Typography,
Alert, CircularProgress, Link, Divider,
Alert, CircularProgress, Link, Divider, FormControlLabel, Checkbox
} from '@mui/material';
import PersonAddOutlinedIcon from '@mui/icons-material/PersonAddOutlined';
import axiosInstance from '../../api/axiosInstance.js';
@@ -12,6 +12,7 @@ export default function RegisterPage() {
const [form, setForm] = useState({ email: '', nickname: '', password: '', confirmPassword: '' });
const [error, setError] = useState('');
const [loading, setLoading] = useState(false);
const [accepted, setAccepted] = useState(false);
const handleChange = (e) => setForm((prev) => ({ ...prev, [e.target.name]: e.target.value }));
@@ -114,13 +115,32 @@ export default function RegisterPage() {
}
/>
<FormControlLabel
control={
<Checkbox
checked={accepted}
onChange={(e) => setAccepted(e.target.checked)}
size="small"
/>
}
label={
<Typography variant="body2">
Ich habe die{' '}
<Link component={RouterLink} to="/datenschutz" underline="hover" target="_blank">
Datenschutzerklärung
</Link>
{' '}gelesen und stimme zu.
</Typography>
}
/>
<Button
type="submit"
variant="contained"
fullWidth
size="large"
disabled={loading}
sx={{ mt: 1 }}
type="submit"
variant="contained"
fullWidth
size="large"
disabled={loading || !accepted}
sx={{ mt: 1 }}
>
{loading ? <CircularProgress size={24} color="inherit" /> : 'Registrieren'}
</Button>