Skip to content

Commit

Permalink
Adding image const to pull from field.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdyoung3 committed Mar 11, 2024
1 parent 0d60a84 commit 85f6b4e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/components/node/sul-study-place/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ const SulStudyPlaceCard = ({node}: { node: NodeSulStudyPlace }) => {
))
) || [];

const imageUrl = node.sulStudyBranch.suLibraryContactImg?.mediaImage.url
const imageAlt = node.sulStudyBranch.suLibraryContactImg?.mediaImage.alt|| '';
const imageUrl = node.sulStudyImage?.mediaImage.url || node.sulStudyBranch.suLibraryContactImg?.mediaImage.url
const imageAlt = node.sulStudyImage?.mediaImage.alt || node.sulStudyBranch.suLibraryContactImg?.mediaImage.alt|| '';

console.log(node.sulStudyImage);

return (
<>
<div className="@container flex w-full leading-display shadow-md border-0 rounded flex-col">
{(imageUrl && !node.sulStudyImage) &&
{(imageUrl) &&
<div className={"overflow-hidden aspect-[16/9] relative "}>
<Image
className="object-cover object-center static"
Expand All @@ -35,12 +35,6 @@ const SulStudyPlaceCard = ({node}: { node: NodeSulStudyPlace }) => {
/>
</div>
}
{(node.sulStudyImage) &&
<div>

</div>

}

{(node.sulStudyLibcalId) &&
<a
Expand Down

0 comments on commit 85f6b4e

Please sign in to comment.