Skip to content

Commit

Permalink
Feat(my-challenge-record): review 작성 이동 기능 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Dobbymin committed Sep 29, 2024
1 parent e5cbe31 commit 1092d42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/pages/my-challenge-record/components/list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ type Props = {
challengeTitle: string;
userNickname: string;
profileImageUrl?: string | null;
id: number;
onClick: (id: number) => void;
};

const ListItem = ({ challengeTitle, profileImageUrl }: Props) => {
const ListItem = ({ challengeTitle, profileImageUrl, onClick, id }: Props) => {
const handleClick = () => {
onClick(id);
};

return (
<ListItemLayout>
<ListItemLayout onClick={handleClick}>
<ProfileContainer>
<Image
src={profileImageUrl || ProfileImg}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/my-challenge-record/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ const MyChallengeRecord = () => {
}, [loadMoreChallenges]);

const handleNavigate = (id: number) => {
navigate(`/challenge/${id}/detail`);
console.log('click');
navigate(`/challenge/${id}/review`);
};

return (
Expand Down

0 comments on commit 1092d42

Please sign in to comment.