fix: center event image and fix Join Now button navigation #7623#7633
fix: center event image and fix Join Now button navigation #7623#7633AnkitRewar11 wants to merge 4 commits intolayer5io:masterfrom
Conversation
|
🚀 Preview deployment: https://layer5io.github.io/layer5/pr-preview/pr-7633/
|
rishiraj38
left a comment
There was a problem hiding this comment.
Please attach a Before and After image for better reference.
Screen.Recording.2026-04-16.001011.mp4@rishiraj38 here are the before and after results, along with a video recording after the changes. |
|
@rishiraj38 These changes have now been applied to the other slide images as well, which weren’t working before. |
a90b873 to
00bed1c
Compare
@rishiraj38 all set, please take a look again. |
00bed1c to
1f7bdb9
Compare
|
@AnkitRewar11 Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂 |


Description
This PR fixes #7623
The Events section on desktop had three issues:
What was wrong and what I fixed
src/components/UpcomingEventCard/EventCard.style.jsThe image container was using
object-fit: containwhich shrinks the image to fit inside the box, leaving black/empty gaps around it. I changed it toobject-fit: coverso the image fills the container properly. I also added flexbox centering (display: flex,align-items: center,justify-content: center) andoverflow: hiddento make sure the image stays centered and does not overflow outside the container.src/components/UpcomingEventCard/index.jsThe "Join Now" button had
$url={item.frontmatter.eurl}which wasnullorundefinedfor events that don't have an external registration link. This caused the button to render without anyhref, so clicking it did nothing. I added a fallback so if no external URL exists, it redirects to the internal event page instead. I also fixed$external={true}which was hardcoded — now it is$external={!!item.frontmatter.eurl}so only events with an external URL open in a new tab.Notes for Reviewers
Only 2 files changed, 1 clean commit. The CI
build:previewfailure is a pre-existing issue in the repo and is not related to these changes.Signed commits