Skip to content

Commit

Permalink
Fix: vote page - useEffect 감지 변수 제거, Test: 장소 이미지 사이즈 유지
Browse files Browse the repository at this point in the history
  • Loading branch information
goeun208 committed May 9, 2024
1 parent 314182b commit b4cfddc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
16 changes: 12 additions & 4 deletions src/components/place/PlaceItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@ const PlaceItem = ({ title, thumUrl, distance, openTime, tel, category }: PlaceI
<>
<div className="bg-white w-[585px] rounded-2xl flex-row flex gap-5 shadow-card_shadow ">
{thumUrl ? (
<div style={{ overflow: 'hidden' }} className="rounded-l-lg flex justify-start">
<Image src={thumUrl} width={175} height={175} objectFit="cover" alt="placeImg" priority />
<div style={{ overflow: 'hidden' }} className="rounded-l-lg flex justify-start relative">
<Image src={thumUrl} width={175} height={175} fill style={{ objectFit: 'cover' }} alt="placeImg" priority />
</div>
) : (
<div style={{ overflow: 'hidden' }} className="rounded-l-lg flex justify-start">
<Image src={renderCategoryImage()} width={175} height={185} objectFit="cover" alt="placeImg" priority />
<div style={{ overflow: 'hidden' }} className="rounded-l-lg flex justify-start relative">
<Image
src={renderCategoryImage()}
width={175}
height={185}
fill
style={{ objectFit: 'cover' }}
alt="placeImg"
priority
/>
</div>
)}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/vote/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const VotePage = () => {

useEffect(() => {
if (response?.message === '성공') setVoteData(response?.data);
}, [response]);
}, []);

if (isLoading) {
console.log('isLoading', isLoading);
Expand Down

0 comments on commit b4cfddc

Please sign in to comment.