Skip to content
Snippets Groups Projects
Commit 7a257696 authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira
Browse files

Merge branch 'issue-353/FIX-error-accesss-homologation-on-profile-page' into 'develop'

Issue #353: FIX error homologation on profile page

See merge request !323
parents 2482c858 e049cd62
Branches
No related tags found
1 merge request!323Issue #353: FIX error homologation on profile page
Pipeline #42684 passed
......@@ -79,21 +79,21 @@ export default function CardsHomologation({ item, key, tag }) {
component="img"
image={
tag ? null :
item["learning_object"]["thumbnail"] === null
? getDefaultThumbnail(item["learning_object"]["object_type"])
: mecredURL + item["learning_object"]["thumbnail"]
item.learning_object?.thumbnail === null
? getDefaultThumbnail(item.learning_object?.object_type)
: mecredURL + item.learning_object?.thumbnail
}
title={ tag ? item[0]?.name : item["learning_object"]["thumbnail"]}
title={ tag ? item[0]?.name : item.learning_object?.thumbnail}
alt="img"
/>
<CardHeader
className="self-start flex-shrink h-[100px]"
avatar={tag ? null : item["submitter"]["avatar"] === null ? null :
avatar={tag ? null : item.submitter?.avatar === null ? null :
<Link href="/perfil">
<Avatar
src={mecredURL + item["submitter"]["avatar"]}
alt={item["submitter"]["name"]}
title={item["submitter"]["name"]}
src={mecredURL + item.submitter?.avatar}
alt={item.submitter?.name}
title={item.submitter?.name}
// className="-mt-9"
sx={{
width: 28,
......@@ -106,7 +106,7 @@ export default function CardsHomologation({ item, key, tag }) {
}
title={
<Typography variant="body2" color="" className="line-clamp-2 text-darkGray-HC-white-underline font-bold">
{ tag ? item[0]?.name : item["learning_object"]["name"]}
{ tag ? item[0]?.name : item.learning_object?.name}
</Typography>
}
subheader={
......@@ -116,7 +116,7 @@ export default function CardsHomologation({ item, key, tag }) {
color="text.secondary"
className="line-clamp-1 text-darkGray-HC-white-underline font-light"
>
{tag ? item[0]?.name : item["submitter"]["name"]}
{tag ? item[0]?.name : item.submitter?.name}
</Typography>
</>
}
......@@ -126,7 +126,7 @@ export default function CardsHomologation({ item, key, tag }) {
className="text-darkGray-HC-white-underline font-light border-2 border-ice-HC-white"
variant='outlined'
alt='Avaliar'
onClick={() => window.open(location.protocol + `//` + location.host + `/recurso/${item["learning_object"]["id"]}`)}
onClick={() => window.open(location.protocol + `//` + location.host + `/recurso/${item.learning_object?.id}`)}
>
Avaliar
</Button>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment