From b4a5f68b878acdc5b573826e8c72f710eb38c711 Mon Sep 17 00:00:00 2001 From: minbo Date: Tue, 24 Sep 2024 23:36:10 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=94=84=EB=A1=9C=ED=86=A0?= =?UTF-8?q?=EC=BD=9C=EC=9D=B4=20=EB=B6=99=EC=A7=80=20=EC=95=8A=EC=9D=80=20?= =?UTF-8?q?url=EC=97=90=20=EB=8C=80=ED=95=B4=EC=84=9C=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=ED=86=A0=EC=BD=9C=EC=9D=84=20=EB=B6=99=EC=97=AC=EC=A3=BC?= =?UTF-8?q?=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/applicant/applicantNode/Portfolio.tsx | 7 +++---- frontend/src/utils/applicant/index.ts | 10 ---------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/frontend/components/applicant/applicantNode/Portfolio.tsx b/frontend/components/applicant/applicantNode/Portfolio.tsx index 6b6f696..2880d52 100644 --- a/frontend/components/applicant/applicantNode/Portfolio.tsx +++ b/frontend/components/applicant/applicantNode/Portfolio.tsx @@ -1,7 +1,6 @@ import Txt from "@/components/common/Txt.component"; import { ApplicantReq } from "@/src/apis/applicant"; import { applicantDataFinder } from "@/src/functions/finder"; -import { changeIntactUrl } from "@/src/utils/applicant"; import Link from "next/link"; interface PortfolioProps { @@ -13,15 +12,15 @@ const Portfolio = ({ data }: PortfolioProps) => { const portfolio = applicantDataFinder(data, "portfolio") .split(regex) - .map((url: string) => changeIntactUrl(url.trim())); + .map((url: string) => url.trim()); const file = applicantDataFinder(data, "fileUrl") .split(regex) - .map((url: string) => changeIntactUrl(url.trim())); + .map((url: string) => url.trim()); const fileUrlForPlanner = applicantDataFinder(data, "fileUrlforPlanner") .split(regex) - .map((url: string) => changeIntactUrl(url.trim())); + .map((url: string) => url.trim()); return ( <> diff --git a/frontend/src/utils/applicant/index.ts b/frontend/src/utils/applicant/index.ts index d25ed83..3210c4a 100644 --- a/frontend/src/utils/applicant/index.ts +++ b/frontend/src/utils/applicant/index.ts @@ -7,13 +7,3 @@ export const findApplicantState = ( return cardsData.find((card) => card.applicantId === applicantId)?.state .passState; }; - -export const changeIntactUrl = (url: string) => { - if (!url) return url; - - if (!/^https?:\/\//.test(url)) { - return `http://${url}`; - } - - return url; -};