Skip to content
Snippets Groups Projects
Commit 82219f72 authored by lfr20's avatar lfr20
Browse files

Improving style of the page

parent 36349579
No related branches found
No related tags found
2 merge requests!69Fixed upload page: recaptcha not implemented, lack of blocking (part one, two,...,!59Fix production bugs luis
...@@ -112,9 +112,12 @@ export default function PublicUserPage(props) { ...@@ -112,9 +112,12 @@ export default function PublicUserPage(props) {
setUserData(data) setUserData(data)
} }
/*---------------------------------------------------------*/ /*---------------------------------------------------------*/
const [following, setFollowing] = useState([]); const [following, setFollowing] = useState(0);
const fillFollowing = (data) => { const fillFollowing = (data) => {
setFollowing(data); if (data.errors)
setFollowing('Você precisa logar para ver o que usuário está ');
else
setFollowing(data.length);
} }
/*content control variables--------------------------------*/ /*content control variables--------------------------------*/
...@@ -191,7 +194,7 @@ export default function PublicUserPage(props) { ...@@ -191,7 +194,7 @@ export default function PublicUserPage(props) {
</Grid> </Grid>
<Grid style={{ marginTop: '0.5em', marginBottom: '0.5em', borderTop: "0.5px solid #DCDCDC", borderBottom: "0.5px solid #DCDCDC" }} container spacing={4} justify="center" alignItems="center" direction="row"> <Grid style={{ marginTop: '0.5em', marginBottom: '0.5em', borderTop: "0.5px solid #DCDCDC", borderBottom: "0.5px solid #DCDCDC" }} container spacing={4} justify="center" alignItems="center" direction="row">
<Grid item> <Grid item>
<Typography variant="h6" > <Typography variant="h6" style={{ textAlign: 'center' }}>
{ {
loading ? loading ?
<CircularProgress size={20} /> : <CircularProgress size={20} /> :
...@@ -200,13 +203,11 @@ export default function PublicUserPage(props) { ...@@ -200,13 +203,11 @@ export default function PublicUserPage(props) {
</Typography> </Typography>
</Grid> </Grid>
<Grid item> <Grid item>
<Typography variant="h6" > <Typography variant="h6" style={{ textAlign: 'center' }} >
{ {
loading ? loading ?
<CircularProgress size={20} /> : <CircularProgress size={20} /> :
following ? `${following} seguindo`
`${following.length} seguindo` :
"0 seguindo"
} }
</Typography> </Typography>
</Grid> </Grid>
...@@ -221,7 +222,7 @@ export default function PublicUserPage(props) { ...@@ -221,7 +222,7 @@ export default function PublicUserPage(props) {
onChange={handleChangeTab} onChange={handleChangeTab}
indicatorColor="primary" indicatorColor="primary"
textColor="primary" textColor="primary"
variant="fullwidth" variant="scrollable"
scrollButtons="desktop" scrollButtons="desktop"
TabIndicatorProps={{ style: { background: "#00bcd4" } }} TabIndicatorProps={{ style: { background: "#00bcd4" } }}
> >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment