fix: image wrapper (#78)

This commit is contained in:
Ben Warzeski
2022-11-30 14:07:22 -05:00
committed by GitHub
parent 9a57f9de13
commit 82219e9b08

View File

@@ -20,6 +20,7 @@ export const CourseCardImage = ({ cardId, orientation }) => {
const { isVerified } = appHooks.useCardEnrollmentData(cardId);
const { isEntitlement } = appHooks.useCardEntitlementData(cardId);
const handleImageClicked = appHooks.useTrackCourseEvent(courseImageClicked, cardId, homeUrl);
const wrapperClassName = `pgn__card-wrapper-image-cap overflow-visible ${orientation}`;
const image = (
<>
<img
@@ -43,10 +44,10 @@ export const CourseCardImage = ({ cardId, orientation }) => {
</>
);
return isEntitlement
? image
? (<div className={wrapperClassName}>{image}</div>)
: (
<a
className={`pgn__card-wrapper-image-cap overflow-visible ${orientation}`}
className={wrapperClassName}
href={homeUrl}
onClick={handleImageClicked}
>