Skip to content
Snippets Groups Projects
Commit 84555626 authored by vgm18's avatar vgm18
Browse files

Fixing bugs reported in the worksheet from 21/05

parent 28099687
No related branches found
No related tags found
3 merge requests!69Fixed upload page: recaptcha not implemented, lack of blocking (part one, two,...,!65Fixing bugs vinicius,!64Fixing bugs vinicius
...@@ -207,11 +207,11 @@ export default function CollectionCardFunction(props) { ...@@ -207,11 +207,11 @@ export default function CollectionCardFunction(props) {
<span className={"col-name"}>{name}</span> <span className={"col-name"}>{name}</span>
</UserAndTitle> </UserAndTitle>
</UserInfo> </UserInfo>
<StyledGrid container direction="row" style={{ width: '272.5px'}}> <StyledGrid container direction="row" style={{ width: '272.5px' }}>
{ {
props.thumbnails.map((thumb) => props.thumbnails.map((thumb) =>
<Grid item xs={props.thumbnails <= 4 && props.thumbnails > 0 ? 12 / props.thumbnails.length : 6}> <Grid item xs={props.thumbnails.length <= 3 && props.thumbnails.length > 0 ? 12 / props.thumbnails.length : 6}>
<div style={{ backgroundImage: `url(${`${apiDomain}` + thumb})`, height: "100%", width: "100%", backgroundSize: "cover", backgroundPosition: "center" }} /> <div style={{ backgroundImage: `url(${`${apiDomain}` + thumb})`, height: `${props.thumbnails.length <= 3 ? '230px' : '100%'}`, width: "100%", backgroundSize: "cover", backgroundPosition: "center" }} />
</Grid> </Grid>
) )
} }
......
...@@ -127,6 +127,14 @@ export default function MenuBar(props) { ...@@ -127,6 +127,14 @@ export default function MenuBar(props) {
href: "/admin/home", href: "/admin/home",
value: '6', value: '6',
}) })
const canUserCurator = (elem) => elem.id === 4
if (userRoles.some(canUserCurator))
minhaArea.push({
name: "Curadoria",
href: "/perfil",
value: '5',
})
} }
return minhaArea; return minhaArea;
......
...@@ -65,6 +65,14 @@ export default function MobileDrawerMenu(props) { ...@@ -65,6 +65,14 @@ export default function MobileDrawerMenu(props) {
href: "/admin/home", href: "/admin/home",
value: '6', value: '6',
}) })
const canUserCurator = (elem) => elem.id === 4
if (userRoles.some(canUserCurator))
minhaArea.push({
name: "Curadoria",
href: "/perfil",
value: '5',
})
} }
return minhaArea; return minhaArea;
......
...@@ -291,7 +291,7 @@ export default function LearningObjectPage(props) { ...@@ -291,7 +291,7 @@ export default function LearningObjectPage(props) {
createdAt={recurso.created_at} createdAt={recurso.created_at}
updatedAt={recurso.updated_at} updatedAt={recurso.updated_at}
license={recurso.license} license={recurso.license}
followed={recurso.publisher.followed} followed={recurso.publisher ? recurso.publisher.followed : undefined}
/> />
</Card> </Card>
</Grid> </Grid>
......
...@@ -143,7 +143,7 @@ export default function Search(props) { ...@@ -143,7 +143,7 @@ export default function Search(props) {
useEffect(() => { useEffect(() => {
if (resultsPerPage > 12) { if (resultsPerPage > 12) {
setIsLoading(true); //setIsLoading(true);
collectStuff(option); collectStuff(option);
} }
}, [resultsPerPage]); }, [resultsPerPage]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment