Skip to content
Merged
Show file tree
Hide file tree
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/university-web/public/images/language/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions apps/university-web/public/images/language/duolingo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down Expand Up @@ -48,7 +48,14 @@ const Language = ({ name, logoUrl, score }: { name: string; logoUrl: string; sco
<div className="flex">
<div className="w-[140px] text-k-900 typo-sb-10">{name}</div>
<div>
<Image src={logoUrl} alt="어학시험" width={50} height={50} fallbackSrc="/images/language/default.png" />
<Image
src={logoUrl}
alt={`${name} 로고`}
width={92}
height={40}
className="h-10 w-[92px] object-contain"
fallbackSrc={DEFAULT_LANGUAGE_TEST_LOGO_SRC}
/>
</div>
</div>
<div className="text-secondary typo-sb-7">{score}</div>
Expand Down
25 changes: 18 additions & 7 deletions apps/university-web/src/utils/languageUtils.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
// 시험 종류별 로고 URL 맵
export const logoMap: Record<string, string> = {
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, " ");
}
};
Binary file removed apps/web/public/images/language/default.png
Binary file not shown.
Binary file removed apps/web/public/images/language/ielts.png
Binary file not shown.
Binary file removed apps/web/public/images/language/toefl_ibt.png
Binary file not shown.
Binary file removed apps/web/public/images/language/toefl_itp.png
Binary file not shown.
Binary file removed apps/web/public/images/language/toeic.png
Binary file not shown.
16 changes: 0 additions & 16 deletions apps/web/src/utils/languageUtils.ts

This file was deleted.

Loading