diff --git a/src/Components/CollectionCardFunction.js b/src/Components/CollectionCardFunction.js index ccfb87838cec4850aa89f3a550ad23dfe2f8223b..dd4e3d079b837960dd76e8621f494404c71ecb47 100644 --- a/src/Components/CollectionCardFunction.js +++ b/src/Components/CollectionCardFunction.js @@ -207,11 +207,11 @@ export default function CollectionCardFunction(props) { <span className={"col-name"}>{name}</span> </UserAndTitle> </UserInfo> - <StyledGrid container direction="row" style={{ width: '272.5px'}}> + <StyledGrid container direction="row" style={{ width: '272.5px' }}> { props.thumbnails.map((thumb) => - <Grid item xs={props.thumbnails <= 4 && props.thumbnails > 0 ? 12 / props.thumbnails.length : 6}> - <div style={{ backgroundImage: `url(${`${apiDomain}` + thumb})`, height: "100%", width: "100%", backgroundSize: "cover", backgroundPosition: "center" }} /> + <Grid item xs={props.thumbnails.length <= 3 && props.thumbnails.length > 0 ? 12 / props.thumbnails.length : 6}> + <div style={{ backgroundImage: `url(${`${apiDomain}` + thumb})`, height: `${props.thumbnails.length <= 3 ? '230px' : '100%'}`, width: "100%", backgroundSize: "cover", backgroundPosition: "center" }} /> </Grid> ) } diff --git a/src/Components/MenuBar.js b/src/Components/MenuBar.js index cd5cb4d2e7dbe4f53282798b0a4f921b58933d32..c79d52b6f2cefa5ccf8b2e9ab5b65c5db26a5883 100644 --- a/src/Components/MenuBar.js +++ b/src/Components/MenuBar.js @@ -127,6 +127,14 @@ export default function MenuBar(props) { href: "/admin/home", value: '6', }) + + const canUserCurator = (elem) => elem.id === 4 + if (userRoles.some(canUserCurator)) + minhaArea.push({ + name: "Curadoria", + href: "/perfil", + value: '5', + }) } return minhaArea; diff --git a/src/Components/MobileDrawerMenu.js b/src/Components/MobileDrawerMenu.js index ef63cc8782745e46c91e6ff72e9344b55888a238..f99498f24c46eec01ff1b6aa6ee1f20bbe8d4197 100644 --- a/src/Components/MobileDrawerMenu.js +++ b/src/Components/MobileDrawerMenu.js @@ -65,6 +65,14 @@ export default function MobileDrawerMenu(props) { href: "/admin/home", value: '6', }) + + const canUserCurator = (elem) => elem.id === 4 + if (userRoles.some(canUserCurator)) + minhaArea.push({ + name: "Curadoria", + href: "/perfil", + value: '5', + }) } return minhaArea; diff --git a/src/Pages/ResourcePage.js b/src/Pages/ResourcePage.js index de617c87b18f62af0c7455b16896ace3a2211ec9..4fdc717e4ffa5ce02a67d70ec4213853796e6442 100644 --- a/src/Pages/ResourcePage.js +++ b/src/Pages/ResourcePage.js @@ -291,7 +291,7 @@ export default function LearningObjectPage(props) { createdAt={recurso.created_at} updatedAt={recurso.updated_at} license={recurso.license} - followed={recurso.publisher.followed} + followed={recurso.publisher ? recurso.publisher.followed : undefined} /> </Card> </Grid> diff --git a/src/Pages/Search.js b/src/Pages/Search.js index df73156155fd5ba1405a6601bd900df4448c7efa..ae699d2abf1d545e7312911187499a512026d81d 100644 --- a/src/Pages/Search.js +++ b/src/Pages/Search.js @@ -143,7 +143,7 @@ export default function Search(props) { useEffect(() => { if (resultsPerPage > 12) { - setIsLoading(true); + //setIsLoading(true); collectStuff(option); } }, [resultsPerPage]);