legal sachen, profil löschen etc
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user