import React, { useState } from 'react'; import { ContentSection } from 'react-benzin'; import { Link, TextField, Button } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import { useAuth } from '../../hooks/useAuth'; const useStyles = makeStyles(theme => ({ form: { width: theme.spacing(50), display: 'flex', flexDirection: 'column', '& > *': { margin: theme.spacing(1) } }, })); const LoginSection: React.FC = () => { const classes = useStyles(); const { login, isAuthenticated } = useAuth(); const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const handleChangeUsername = (event: React.ChangeEvent) => { setUsername(event.target.value); }; const handleChangePassword = (event: React.ChangeEvent) => { setPassword(event.target.value); }; const handleSubmit = () => login(username, password); return isAuthenticated ? null : ( Log in using your EDUFPMI credentials

); }; export default LoginSection;