Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 기획자 포트폴리오가 보이지 않는 문제 해결 #207

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions frontend/components/applicant/applicantNode/Portfolio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ const Portfolio = ({ data }: PortfolioProps) => {
.split(regex)
.map((url: string) => url.trim());

const fileUrlForPlanner = applicantDataFinder(data, "fileUrlforPlanner")
.split(regex)
.map((url: string) => url.trim());

return (
<>
<Txt typography="h4">포트폴리오</Txt>
Expand All @@ -42,6 +46,18 @@ const Portfolio = ({ data }: PortfolioProps) => {
);
})}
</div>
{!!fileUrlForPlanner && (
<div className="flex-1 flex flex-col">
<Txt typography="h6">이번 학기 프로젝트 기획서</Txt>
{fileUrlForPlanner.map((url: string, index: number) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 부분은 타입추론이 되는 부분이라고 생각이 듭니다!
혹시 해당 부분 타입을 명시하진 이유가 있나요??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

레거시가 applicantDataFinder를 사용하는데, 이 함수가 any를 반환하고 있어서 일단 기존 코드 스타일 그대로 따라갔습니다 ㅠ

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

하하... 죄송합니다..... 레거시를 남겨두었네요 ㅠㅠ

return (
<Link href={url} target="_blank" key={index}>
<Txt className="break-all">{url}</Txt>
</Link>
);
})}
</div>
)}
</div>
</>
);
Expand Down