-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- pdf viewer에 포트폴리오를 추가한다
- Loading branch information
Showing
3 changed files
with
54 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
frontend/components/applicant/applicantNode/Portfolio.component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import Txt from "@/components/common/Txt.component"; | ||
import { ApplicantReq } from "@/src/apis/applicant"; | ||
import { applicantDataFinder } from "@/src/functions/finder"; | ||
import Link from "next/link"; | ||
|
||
interface PortfolioProps { | ||
data: ApplicantReq[]; | ||
} | ||
|
||
const Portfolio = ({ data }: PortfolioProps) => { | ||
const regex = /[\s,;|]+/; | ||
|
||
const portfolio = applicantDataFinder(data, "portfolio") | ||
.split(regex) | ||
.map((url: string) => url.trim()); | ||
|
||
const file = applicantDataFinder(data, "fileUrl") | ||
.split(regex) | ||
.map((url: string) => url.trim()); | ||
|
||
return ( | ||
<> | ||
<Txt typography="h4">포트폴리오</Txt> | ||
<div className="flex gap-4"> | ||
<div className="flex-1 flex flex-col"> | ||
<Txt typography="h6">링크</Txt> | ||
{portfolio.map((url: string, index: number) => { | ||
return ( | ||
<Link href={url} target="_blank" key={index}> | ||
<Txt className="break-all">{url}</Txt> | ||
</Link> | ||
); | ||
})} | ||
</div> | ||
<div className="flex-1 flex flex-col"> | ||
<Txt typography="h6">파일</Txt> | ||
{file.map((url: string, index: number) => { | ||
return ( | ||
<Link href={url} target="_blank" key={index}> | ||
<Txt className="break-all">{url}</Txt> | ||
</Link> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default Portfolio; |