Skip to content

Commit

Permalink
hotfix : 이미지 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ohsuhyeon0119 committed Feb 3, 2024
1 parent 232089f commit a3129b0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
18 changes: 10 additions & 8 deletions src/components/ContentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function ContentList({ title, order }: ContentListProps) {
average_rate: 5,
my_rate: null,
},
]),
])
);

const { accessToken } = useAuthContext();
Expand All @@ -119,17 +119,19 @@ export default function ContentList({ title, order }: ContentListProps) {
movie: MovieType;
my_rate: number | null;
rank: number;
average_rate: number | null;
}) => {
const movie = movieRes.movie;
return {
...movie,
average_rate: movieRes.average_rate,
poster: movie.poster.replace("http", "https"),
my_rate: movieRes.my_rate
? { my_rate: movieRes.my_rate }
: null,
};
},
),
}
)
);
});
order === "latest" &&
Expand All @@ -142,7 +144,7 @@ export default function ContentList({ title, order }: ContentListProps) {
...movie,
poster: movie.poster.replace("http", "https"),
};
}),
})
);
});
order === "recommend" &&
Expand All @@ -156,7 +158,7 @@ export default function ContentList({ title, order }: ContentListProps) {
...movie,
poster: movie.poster.replace("http", "https"),
};
}),
})
);
});
}, [order, accessToken]);
Expand All @@ -175,7 +177,7 @@ export default function ContentList({ title, order }: ContentListProps) {
setIsLast(
scrollWidth && carouselWidth
? carouselWidth - nextTranslateX === scrollWidth
: false,
: false
);
}
}
Expand All @@ -191,7 +193,7 @@ export default function ContentList({ title, order }: ContentListProps) {
setIsLast(
scrollWidth && carouselWidth
? carouselWidth - nextTranslateX === scrollWidth
: false,
: false
);
}
}
Expand All @@ -203,7 +205,7 @@ export default function ContentList({ title, order }: ContentListProps) {
<div className={styles.scrollBar} ref={carouselContentRef}>
<ul ref={carouselUlRef}>
{contents.map((content: MovieType, index: number) =>
ContentCell(content, index + 1),
ContentCell(content, index + 1)
)}
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function SearchBar({
onBlur={() => setShowRecommend(false)}
onFocus={() => setShowRecommend(true)}
autoComplete="off"
placeholder="콘텐츠, 인물, 유저를 검색해보세요."
placeholder="영화 또는 유저를 검색해보세요."
type="text"
value={searchInput}
onChange={onSearchChange}
Expand Down
1 change: 1 addition & 0 deletions src/components/user/User.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
margin-left: auto;
width: 9px;
height: 14px;
object-fit: cover;
}
}
}
7 changes: 5 additions & 2 deletions src/components/user/UserCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function UserCard({
const myId = myUserData?.id;
const isMyUserCard = follower.id === myId;
const buttonClickHandler = (
e: React.MouseEvent<HTMLButtonElement, MouseEvent>,
e: React.MouseEvent<HTMLButtonElement, MouseEvent>
) => {
e.preventDefault();
if (!accessToken) return;
Expand All @@ -41,7 +41,10 @@ export default function UserCard({
<Link to={`/users/${follower.id}`}>
<div className={styles.imgBox}>
<img
src="https://an2-glx.amz.wtchn.net/assets/default/user/photo_file_name_large-ab0a7f6a92a282859192ba17dd4822023e22273e168c2daf05795e5171e66446.jpg"
src={
follower.profile_photo ??
"https://an2-glx.amz.wtchn.net/assets/default/user/photo_file_name_large-ab0a7f6a92a282859192ba17dd4822023e22273e168c2daf05795e5171e66446.jpg"
}
alt="userImg"
/>
</div>
Expand Down

0 comments on commit a3129b0

Please sign in to comment.