Skip to content

Commit

Permalink
refactor : lazy loading to EventCard component
Browse files Browse the repository at this point in the history
  • Loading branch information
hyesung99 committed Jan 30, 2024
1 parent e4eab47 commit 9e42650
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/MainEvents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const MainEvents = ({ pathname }: MainEventsProps) => {
isEnded={eventInfo.isEnded}
clubName={clubInfo.name}
clubLogoImageUrl={clubInfo.logoImageUrl}
isLazy={true}
/>
);
})}
Expand Down
4 changes: 3 additions & 1 deletion src/components/common/EventCard/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ interface EventProps {
startDate?: string;
endDate?: string;
clubLogoImageUrl?: string;
isLazy?: boolean;
clubName: string;
openStatus?: string;
isEnded: boolean;
Expand All @@ -40,12 +41,13 @@ const EventCard = ({
clubName,
openStatus,
isEnded,
isLazy,
}: EventProps) => {
const navigate = useNavigate();

return (
<ContainerStyled onClick={() => navigate(PATH.EVENT.DETAIL(eventId))}>
<Poster posterSrc={posterSrc} width={9.5} isEnded={isEnded}>
<Poster isLazy={isLazy} posterSrc={posterSrc} width={9.5} isEnded={isEnded}>
{openStatus && (
<EventStatusTag
eventTag={APPLIED_EVENTS_TAGS[openStatus === 'ALL' ? 'publicEvent' : 'clubOnlyEvent']}
Expand Down

0 comments on commit 9e42650

Please sign in to comment.