From b8c50f1bd8e0e938929e1a2f61a859768b9a3afc Mon Sep 17 00:00:00 2001 From: David Huang Date: Fri, 26 Apr 2024 01:12:45 -0500 Subject: [PATCH 1/2] feature/change-default-event-icon added styling to make sure the image stays circular --- components/shared/EventCard.tsx | 16 ++++++++++------ components/shared/LongEventCard.tsx | 2 +- public/eventCard/book-icon.jpeg | Bin 0 -> 2532 bytes styles/components/eventCard.styles.tsx | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 public/eventCard/book-icon.jpeg diff --git a/components/shared/EventCard.tsx b/components/shared/EventCard.tsx index 3953c49f..b9025935 100644 --- a/components/shared/EventCard.tsx +++ b/components/shared/EventCard.tsx @@ -7,6 +7,7 @@ import Link from 'next/link'; import { AddressContainer, AddressIcon, + CircularImageContainer, ClockIcon, Container, EventImage, @@ -86,12 +87,15 @@ const EventCard = ({ - Event image icon + {/* make the image circular */} + + Event image icon + {eventData.name} diff --git a/components/shared/LongEventCard.tsx b/components/shared/LongEventCard.tsx index e2cb528b..887fb274 100644 --- a/components/shared/LongEventCard.tsx +++ b/components/shared/LongEventCard.tsx @@ -30,7 +30,7 @@ const LongEventCard = ({ Event image iconX285eXdy1O*hOTtIq6EFeu<0O=hm ziExcd2L&udswmP?P!3Sogkp-?y+#>&o(U}s}v=SOiJ;zkPyA3+NU35kfyN{Wac6%!JYQo|mV zS5Q_~7M9e|QCHNKRZ><2!QpUrHg-M)f=>}6gi-vzZNCRV!hn9D9}E%&n2;ba60}bN zyMyQqfxBTy}HzIFn{>Wq#cgo}Y z@%;ViA8(IrhQ|+jxBUe)+Ku+@j`p+hF)c`QS1C;l!JAk2b)sa(uDHnzoJ*QKcmfdp z>J>BRo#d=%;`x&QqP0n*#+jB$(d}yoNmwWU`xfUj<7p`Vi*YWaC|rtTRcJ!T!vk7O za&eI%QTK|%R+}-T*|g~y(%j^CoBJ<9rx5(FDv?(V4lal0X~;dPn2$6rZ-D0M3Lg9P zb@NAPGBISkYE-YuA=h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=xAluKt1!(v$B!hXytHa_tmj$o zFRsQc3bx&d52{NP@-{Wg{HUpYyi8-ae0k^Q15tQj_tUYQ0`fN|M=a$&^v&9OG0e7( zTfCy^n#E%@c*e^ElgFpU-g{%Mkrb9>G<1nVLGoD9gd_tFn^{ps1TADO(^FaHE2*?; z?Km{OD0RtAXS-BZH5zC3HtU#@il^r0=?l5NuO-1Ny33ap@jX!px`KAJswJ*~ka;Az z`7AN&gV%<5{!+W4;-iz*MnPY6@`1s3;uCG7i}}Lt>DyeQ zG=tczXs3D^1X3w6zN6wwVvzhC-zdniR_p=e(>EoK>%&` line-height: ${props => props.ratio * 22}px; ${Overflow}; `; + + + +// a container that makes the image within it circular +export const CircularImageContainer = styled.div<{ + ratio: number; + size: number; +}>` + border-radius: 50%; + // width and height are calculated based on the ratio prop + width: ${props => props.ratio * props.size} px; + height: ${props => props.ratio * props.size} px; + + ${Overflow}; +`; \ No newline at end of file From b7de2dc7227a414ac9e1b6a5b4da4e44d7b63ee6 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Sat, 27 Apr 2024 00:31:56 -0500 Subject: [PATCH 2/2] Prettier --- styles/components/eventCard.styles.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/styles/components/eventCard.styles.tsx b/styles/components/eventCard.styles.tsx index f05e4873..0b8cda9b 100644 --- a/styles/components/eventCard.styles.tsx +++ b/styles/components/eventCard.styles.tsx @@ -76,8 +76,6 @@ export const InfoFlexChild = styled.div` ${Overflow}; `; - - // a container that makes the image within it circular export const CircularImageContainer = styled.div<{ ratio: number; @@ -89,4 +87,4 @@ export const CircularImageContainer = styled.div<{ height: ${props => props.ratio * props.size} px; ${Overflow}; -`; \ No newline at end of file +`;