Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Gosrock/DuDoong-Front into r…
Browse files Browse the repository at this point in the history
…elease/ticket
  • Loading branch information
9yujin committed Jul 8, 2023
2 parents af87795 + dfb91ee commit b533dd3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/ticket/src/components/home/blocks/EventLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ import { css } from '@emotion/react';
import styled from '@emotion/styled';
import { EventResponse } from '@lib/apis/events/eventType';
import Link from 'next/link';
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import Image from 'next/image';
import { EventStatus } from '@dudoong/utils';

const EventLink = (props: EventResponse) => {
const [img, setImg] = useState(props.posterImage);

useEffect(() => {
setImg(props.posterImage);
}, [props.posterImage]);

return (
<Link href={`events/${props.eventId}`}>
<Wrapper>
<Poster status={props.status}>
<Image
src={img}
src={img || ''}
fill={true}
sizes="(max-width: 768px) 50vw, 25vw"
alt={`${props.name}`}
Expand Down

0 comments on commit b533dd3

Please sign in to comment.