Skip to content

Commit

Permalink
fix: 상대방 프로필 보이도록 수정 및 투두 주석 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
semnil5202 committed Dec 15, 2024
1 parent 1d4a134 commit 9644e73
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/pages/Profile/components/MyProfile/BookmarkSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import { useNavigate } from 'react-router-dom';

import NewIdeaCard from '../../../components/NewIdeaCard/NewIdeaCard';
import { useFeedInfiniteFetch } from '../../../Feed/hooks/useFeedInfiniteFetch';
import useNavigatePage from '../../../hooks/useNavigatePage';
import { useBookmarkedIdeasQuery } from '../../hooks/queries/useBookmarkedIdeasQuery';
import EmptyTabContentSection from '../EmptyTabContentSection';

const BookmarkSection = () => {
const navigate = useNavigate();
const { bookmarkedIdeas, fetchNextPage } = useBookmarkedIdeasQuery();
const { goProfilePage } = useNavigatePage();

const intersectionRef = useRef(null);

Expand Down Expand Up @@ -57,7 +55,6 @@ const BookmarkSection = () => {
return (
<Wrapper key={idea.id}>
<NewIdeaCard id={idea.id} profile={profile} content={content} footer={footer}>
<NewIdeaCard.Profile onClickProfile={() => goProfilePage(idea.memberResponse.id)} />
<NewIdeaCard.Content />
<NewIdeaCard.Footer />
</NewIdeaCard>
Expand Down
10 changes: 9 additions & 1 deletion src/pages/Profile/components/OtherProfile/IdeaSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ const IdeaSection = ({ userId }: Props) => {
{ideas.map((idea) => {
const isMine = false;

// TODO: isBookmarked 가져와야함
const profile = {
profileImageUrl: '',
nickname: '',
mainSkill: '',
isBookmarked: false,
createdAt: 'testTvalue',
};
const content = {
canEdit: isMine,
branches: idea.branches,
Expand All @@ -43,7 +51,7 @@ const IdeaSection = ({ userId }: Props) => {

return (
<Wrapper key={idea.id}>
<NewIdeaCard id={idea.id} content={content} footer={footer}>
<NewIdeaCard id={idea.id} profile={profile} content={content} footer={footer}>
<NewIdeaCard.Content />
<NewIdeaCard.Footer />
</NewIdeaCard>
Expand Down
1 change: 1 addition & 0 deletions src/pages/ProfileEdit/ProfileEdit.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const ProfileEdit = () => {
skillDepthThree: '',
region: regions.find((place) => place.id === prevInputtedData?.livingPlaceId)?.name ?? my.livingPlace ?? '',
});
// TODO: initialValue로 skills 세부 스킬 이전값(prevInputtedData)으로 기억해야함
const { skillDepthOneId, selectedSkillDepths, onDeleteSkill } = useSetDetailSkills({
initialValue: my.skills,
mainSkills,
Expand Down
1 change: 1 addition & 0 deletions src/pages/SignUp/SignUp.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const SignUpPage = () => {
skillDepthThree: '',
region: regions.find((place) => place.id === prevInputtedData?.livingPlaceId)?.name ?? '',
});
// TODO: initialValue로 skills 세부 스킬 이전값(prevInputtedData)으로 기억해야함
const { skillDepthOneId, selectedSkillDepths, onDeleteSkill } = useSetDetailSkills({
mainSkills,
detailSkills,
Expand Down

0 comments on commit 9644e73

Please sign in to comment.