Fix issue with screen heights too small

This commit is contained in:
Leonardo Murça 2022-09-15 19:03:40 -03:00
parent a51ee45af3
commit e65c7233f3
3 changed files with 9 additions and 9 deletions

View file

@ -65,7 +65,7 @@ function AuthenticatedApp() {
}
const container = {
height: '100vh',
height: 'auto',
margin: 0,
padding: 0,
display: 'flex',

View file

@ -29,27 +29,25 @@ function View({ data, onChangeInput }) {
display: 'flex',
alignItems: 'center',
width: '100%',
// TODO: Check issue with screen heights too small
height: '400px',
padding: '30px',
}}
>
<Avatar
alt={fullName}
src={data.avatar}
sx={{ width: 250, height: 250 }}
sx={{ width: 200, height: 200 }}
/>
<Stack sx={{ marginLeft: '30px' }}>
<Typography sx={{ fontWeight: 'bold' }} variant="h3">
<Typography sx={{ fontWeight: 'bold' }} variant="h4">
{fullName}
</Typography>
<Typography sx={{ fontSize: '20px' }} variant="body1">
<Typography sx={{ fontSize: '15px' }} variant="body1">
Estudante de {COURSES.filter(c => c.value === data.course)[0].name}
</Typography>
<Typography sx={{ fontSize: '20px' }} variant="body1">
<Typography sx={{ fontSize: '15px' }} variant="body1">
Turma de {data.year}
</Typography>
<Typography sx={{ fontSize: '20px' }} variant="body1">
<Typography sx={{ fontSize: '15px' }} variant="body1">
<strong>RA: </strong> {data.ra}
</Typography>
</Stack>
@ -170,7 +168,7 @@ function View({ data, onChangeInput }) {
variant="standard"
type="text"
value={data.ra}
placeholder="00#####"
placeholder="#######"
disabled
sx={{ width: '45%', cursor: 'no-drop' }}
InputProps={{

View file

@ -1,8 +1,10 @@
import { useState } from 'react';
import { useUser } from '../../context/user';
import { useDocumentTitle } from '../../hooks/useDocumentTitle';
import View from './View';
function Profile() {
useDocumentTitle('Meu perfil');
const { state } = useUser();
const [data, setData] = useState(state && state.user);