diff --git a/apps/university-web/public/images/language/cefr.png b/apps/university-web/public/images/language/cefr.png new file mode 100644 index 000000000..e4e6b46a2 Binary files /dev/null and b/apps/university-web/public/images/language/cefr.png differ diff --git a/apps/university-web/public/images/language/dalf.png b/apps/university-web/public/images/language/dalf.png new file mode 100644 index 000000000..769931aa5 Binary files /dev/null and b/apps/university-web/public/images/language/dalf.png differ diff --git a/apps/university-web/public/images/language/default.png b/apps/university-web/public/images/language/default.png index 1a17bca56..688481fb7 100644 Binary files a/apps/university-web/public/images/language/default.png and b/apps/university-web/public/images/language/default.png differ diff --git a/apps/university-web/public/images/language/delf.jpg b/apps/university-web/public/images/language/delf.jpg new file mode 100644 index 000000000..3a7e9cb47 Binary files /dev/null and b/apps/university-web/public/images/language/delf.jpg differ diff --git a/apps/university-web/public/images/language/duolingo.svg b/apps/university-web/public/images/language/duolingo.svg new file mode 100644 index 000000000..0ae65dafc --- /dev/null +++ b/apps/university-web/public/images/language/duolingo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/university-web/public/images/language/etc.png b/apps/university-web/public/images/language/etc.png new file mode 100644 index 000000000..8369b3078 Binary files /dev/null and b/apps/university-web/public/images/language/etc.png differ diff --git a/apps/university-web/public/images/language/jlpt.png b/apps/university-web/public/images/language/jlpt.png new file mode 100644 index 000000000..e31707df8 Binary files /dev/null and b/apps/university-web/public/images/language/jlpt.png differ diff --git a/apps/university-web/public/images/language/new_hsk.png b/apps/university-web/public/images/language/new_hsk.png new file mode 100644 index 000000000..2fe785b11 Binary files /dev/null and b/apps/university-web/public/images/language/new_hsk.png differ diff --git a/apps/university-web/public/images/language/tcf.png b/apps/university-web/public/images/language/tcf.png new file mode 100644 index 000000000..efa85961f Binary files /dev/null and b/apps/university-web/public/images/language/tcf.png differ diff --git a/apps/university-web/public/images/language/tef.png b/apps/university-web/public/images/language/tef.png new file mode 100644 index 000000000..54d96928e Binary files /dev/null and b/apps/university-web/public/images/language/tef.png differ diff --git a/apps/university-web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/LanguageSection.tsx b/apps/university-web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/LanguageSection.tsx index 4297e3532..9cfbe45ce 100644 --- a/apps/university-web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/LanguageSection.tsx +++ b/apps/university-web/src/app/university/[homeUniversity]/[id]/_ui/UniversityDetail/_ui/LanguageSection.tsx @@ -3,7 +3,7 @@ import Image from "@/components/ui/FallbackImage"; import LinkifyText from "@/components/ui/LinkifyText"; import type { LanguageRequirement } from "@/types/university"; -import { formatLanguageTestName, getLanguageTestLogo } from "@/utils/languageUtils"; +import { DEFAULT_LANGUAGE_TEST_LOGO_SRC, formatLanguageTestName, getLanguageTestLogo } from "@/utils/languageUtils"; interface LanguageSectionProps { languageRequirements: LanguageRequirement[]; @@ -48,7 +48,14 @@ const Language = ({ name, logoUrl, score }: { name: string; logoUrl: string; sco
{name}
- 어학시험 + {`${name}
{score}
diff --git a/apps/university-web/src/utils/languageUtils.ts b/apps/university-web/src/utils/languageUtils.ts index 7116c8ba5..595c63c84 100644 --- a/apps/university-web/src/utils/languageUtils.ts +++ b/apps/university-web/src/utils/languageUtils.ts @@ -1,16 +1,27 @@ -// 시험 종류별 로고 URL 맵 -export const logoMap: Record = { +export const DEFAULT_LANGUAGE_TEST_LOGO_SRC = "/images/language/default.png"; + +export const logoMap = { TOEIC: "/images/language/toeic.png", TOEFL_IBT: "/images/language/toefl_ibt.png", TOEFL_ITP: "/images/language/toefl_itp.png", IELTS: "/images/language/ielts.png", -}; + JLPT: "/images/language/jlpt.png", + NEW_HSK: "/images/language/new_hsk.png", + ETC: "/images/language/etc.png", + DALF: "/images/language/dalf.png", + DELF: "/images/language/delf.jpg", + CEFR: "/images/language/cefr.png", + TCF: "/images/language/tcf.png", + TEF: "/images/language/tef.png", + DUOLINGO: "/images/language/duolingo.svg", +} as const; + +type LanguageTestLogoType = keyof typeof logoMap; export const getLanguageTestLogo = (type: string): string => { - return logoMap[type] || "/images/language/default.png"; + return type in logoMap ? logoMap[type as LanguageTestLogoType] : DEFAULT_LANGUAGE_TEST_LOGO_SRC; }; -// UNDER_SCORE → "UNDER SCORE" 처리를 위한 헬퍼 -export function formatLanguageTestName(type: string): string { +export const formatLanguageTestName = (type: string): string => { return type.replace(/_/g, " "); -} +}; diff --git a/apps/web/public/images/language/default.png b/apps/web/public/images/language/default.png deleted file mode 100644 index 1a17bca56..000000000 Binary files a/apps/web/public/images/language/default.png and /dev/null differ diff --git a/apps/web/public/images/language/ielts.png b/apps/web/public/images/language/ielts.png deleted file mode 100644 index 6218faaf9..000000000 Binary files a/apps/web/public/images/language/ielts.png and /dev/null differ diff --git a/apps/web/public/images/language/toefl_ibt.png b/apps/web/public/images/language/toefl_ibt.png deleted file mode 100644 index e8968e74b..000000000 Binary files a/apps/web/public/images/language/toefl_ibt.png and /dev/null differ diff --git a/apps/web/public/images/language/toefl_itp.png b/apps/web/public/images/language/toefl_itp.png deleted file mode 100644 index a27b37504..000000000 Binary files a/apps/web/public/images/language/toefl_itp.png and /dev/null differ diff --git a/apps/web/public/images/language/toeic.png b/apps/web/public/images/language/toeic.png deleted file mode 100644 index 1a17bca56..000000000 Binary files a/apps/web/public/images/language/toeic.png and /dev/null differ diff --git a/apps/web/src/utils/languageUtils.ts b/apps/web/src/utils/languageUtils.ts deleted file mode 100644 index 7116c8ba5..000000000 --- a/apps/web/src/utils/languageUtils.ts +++ /dev/null @@ -1,16 +0,0 @@ -// 시험 종류별 로고 URL 맵 -export const logoMap: Record = { - TOEIC: "/images/language/toeic.png", - TOEFL_IBT: "/images/language/toefl_ibt.png", - TOEFL_ITP: "/images/language/toefl_itp.png", - IELTS: "/images/language/ielts.png", -}; - -export const getLanguageTestLogo = (type: string): string => { - return logoMap[type] || "/images/language/default.png"; -}; - -// UNDER_SCORE → "UNDER SCORE" 처리를 위한 헬퍼 -export function formatLanguageTestName(type: string): string { - return type.replace(/_/g, " "); -}