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.
31 changes: 10 additions & 21 deletions apps/university-web/src/constants/university.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ export const REGIONS_KO = ["유럽권", "미주권", "아시아권", "중국권"
*/
export const HOME_UNIVERSITY_SLUG_MAP: Record<HomeUniversitySlug, HomeUniversity> = {
inha: HomeUniversity.INHA,
incheon: HomeUniversity.INCHEON,
sungshin: HomeUniversity.SUNGSHIN,
kyunghee: HomeUniversity.KYUNGHEE,
};

/**
* 홈 대학교 enum에서 슬러그로 역매핑
*/
export const HOME_UNIVERSITY_TO_SLUG_MAP: Record<HomeUniversity, HomeUniversitySlug> = {
[HomeUniversity.INHA]: "inha",
[HomeUniversity.INCHEON]: "incheon",
[HomeUniversity.SUNGSHIN]: "sungshin",
[HomeUniversity.KYUNGHEE]: "kyunghee",
};

/**
Expand All @@ -53,22 +51,13 @@ export const HOME_UNIVERSITY_LIST: HomeUniversityInfo[] = [
color: "#004C98",
},
{
homeUniversityId: 2,
name: HomeUniversity.INCHEON,
slug: "incheon",
shortName: "인천대",
logoUrl: "/images/univs/incheon.png",
description: "인천대학교 교환학생 프로그램",
color: "#003876",
},
{
homeUniversityId: 3,
name: HomeUniversity.SUNGSHIN,
slug: "sungshin",
shortName: "성신여대",
logoUrl: "/images/univs/sungshin.jpg",
description: "성신여자대학교 교환학생 프로그램",
color: "#7B1FA2",
homeUniversityId: 4,
name: HomeUniversity.KYUNGHEE,
slug: "kyunghee",
shortName: "경희대",
logoUrl: "/images/univs/kyunghee.png",
description: "경희대학교 교환학생 프로그램",
color: "#8C1515",
},
];

Expand Down Expand Up @@ -118,7 +107,7 @@ export const getHomeUniversitySlugByName = (value: string | null | undefined): H
/**
* 유효한 홈 대학교 슬러그 목록
*/
export const HOME_UNIVERSITY_SLUGS: HomeUniversitySlug[] = ["inha", "incheon", "sungshin"];
export const HOME_UNIVERSITY_SLUGS: HomeUniversitySlug[] = ["inha", "kyunghee"];
Comment thread
yoonc01 marked this conversation as resolved.
Comment thread
yoonc01 marked this conversation as resolved.

export const COUNTRIES_KO = [
// 2024-2 기준
Expand Down
5 changes: 2 additions & 3 deletions apps/university-web/src/types/university.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ export type RegionKo = "유럽권" | "미주권" | "아시아권";

export enum HomeUniversityName {
INHA = "인하대학교",
INCHEON = "인천대학교",
SUNGSHIN = "성신여자대학교",
KYUNGHEE = "경희대학교",
}

export { HomeUniversityName as HomeUniversity };

export type HomeUniversitySlug = "inha" | "incheon" | "sungshin";
export type HomeUniversitySlug = "inha" | "kyunghee";

export interface RegionOption {
value: string;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const imageRemotePatterns = [

const universityWebDomain = process.env.UNIVERSITY_WEB_DOMAIN?.replace(/\/$/, "");
const isProductionRuntime = process.env.NODE_ENV === "production";
const universitySlugPattern = "(inha|incheon|sungshin)";
const universitySlugPattern = "(inha|kyunghee)";
Comment thread
yoonc01 marked this conversation as resolved.

if (isProductionRuntime && !universityWebDomain) {
throw new Error("UNIVERSITY_WEB_DOMAIN is required because /university catalog routes are served by university-web.");
Expand Down
Binary file added apps/web/public/images/univs/kyunghee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 10 additions & 21 deletions apps/web/src/constants/university.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@ export const REGIONS_KO = ["유럽권", "미주권", "아시아권", "중국권"
*/
export const HOME_UNIVERSITY_SLUG_MAP: Record<HomeUniversitySlug, HomeUniversity> = {
inha: HomeUniversity.INHA,
incheon: HomeUniversity.INCHEON,
sungshin: HomeUniversity.SUNGSHIN,
kyunghee: HomeUniversity.KYUNGHEE,
};

/**
* 홈 대학교 enum에서 슬러그로 역매핑
*/
export const HOME_UNIVERSITY_TO_SLUG_MAP: Record<HomeUniversity, HomeUniversitySlug> = {
[HomeUniversity.INHA]: "inha",
[HomeUniversity.INCHEON]: "incheon",
[HomeUniversity.SUNGSHIN]: "sungshin",
[HomeUniversity.KYUNGHEE]: "kyunghee",
};

/**
Expand All @@ -53,22 +51,13 @@ export const HOME_UNIVERSITY_LIST: HomeUniversityInfo[] = [
color: "#004C98",
},
{
homeUniversityId: 2,
name: HomeUniversity.INCHEON,
slug: "incheon",
shortName: "인천대",
logoUrl: "/images/univs/incheon.png",
description: "인천대학교 교환학생 프로그램",
color: "#003876",
},
{
homeUniversityId: 3,
name: HomeUniversity.SUNGSHIN,
slug: "sungshin",
shortName: "성신여대",
logoUrl: "/images/univs/sungshin.jpg",
description: "성신여자대학교 교환학생 프로그램",
color: "#7B1FA2",
homeUniversityId: 4,
name: HomeUniversity.KYUNGHEE,
slug: "kyunghee",
shortName: "경희대",
logoUrl: "/images/univs/kyunghee.png",
description: "경희대학교 교환학생 프로그램",
color: "#8C1515",
},
];

Expand Down Expand Up @@ -118,7 +107,7 @@ export const getHomeUniversitySlugByName = (value: string | null | undefined): H
/**
* 유효한 홈 대학교 슬러그 목록
*/
export const HOME_UNIVERSITY_SLUGS: HomeUniversitySlug[] = ["inha", "incheon", "sungshin"];
export const HOME_UNIVERSITY_SLUGS: HomeUniversitySlug[] = ["inha", "kyunghee"];

export const COUNTRIES_KO = [
// 2024-2 기준
Expand Down
5 changes: 2 additions & 3 deletions apps/web/src/types/university.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ export type RegionKo = "유럽권" | "미주권" | "아시아권";

export enum HomeUniversityName {
INHA = "인하대학교",
INCHEON = "인천대학교",
SUNGSHIN = "성신여자대학교",
KYUNGHEE = "경희대학교",
}

export { HomeUniversityName as HomeUniversity };

export type HomeUniversitySlug = "inha" | "incheon" | "sungshin";
export type HomeUniversitySlug = "inha" | "kyunghee";

export interface RegionOption {
value: string;
Expand Down
Loading