Skip to content

Commit

Permalink
Merge pull request #109 from flareseek/feat/link
Browse files Browse the repository at this point in the history
feat: 타임테이블 링크 추가
  • Loading branch information
flareseek authored Sep 23, 2024
2 parents 8f0b1fe + 8377251 commit c109431
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/pages/Timetable/.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ export const timeTableDescription = style({
},
});

export const timeTableLink = style({
color: vars.color.blue2,
textDecoration: "none",
marginLeft: "5px",
fontFamily: vars.font.pretendardRegular,
});

export const timeTableTime = style({
fontSize: "0.9rem",
fontWeight: "bold",
Expand Down
14 changes: 13 additions & 1 deletion src/pages/Timetable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,19 @@ const TimeTableItem: React.FC<{
<div className={`${styles.timeTableItem}`} ref={status === "current" ? refCallback : null}>
<h2 className={styles.timeTableTitle}>{timeTable.title}</h2>
{timeTable.descriptionShow && (
<p className={styles.timeTableDescription}>{timeTable.description}</p>
<p className={styles.timeTableDescription}>
{timeTable.description}
{timeTable.link && (
<a
className={styles.timeTableLink}
href={timeTable.link.url}
target="_blank"
rel="noreferrer"
>
{timeTable.link.text}
</a>
)}
</p>
)}
<p className={styles.timeTableTime}>
{timeTable.startTime.getMonth() + 1}/{timeTable.startTime.getDate()} |{" "}
Expand Down
18 changes: 15 additions & 3 deletions src/pages/Timetable/timeTableInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,15 @@ export const timeTableInfo: timeTableInfoProps[] = [
},
{
title: "재학생 우선 입장",
description: "재학생 우선 입장 시간 (자세한 안내는 인스타그램 참조)",
description: "재학생 우선 입장 시간",
descriptionShow: true,
date: new Date("2024-09-23"),
startTime: new Date("2024-09-23 17:00"),
endTime: new Date("2024-09-23 17:50"),
link: {
text: "(자세히보기)",
url: "https://www.instagram.com/p/DAFpPQ_SQyL",
},
},
{
title: "전체 입장",
Expand All @@ -404,11 +408,15 @@ export const timeTableInfo: timeTableInfoProps[] = [
},
{
title: "재학생 우선 입장",
description: "재학생 우선 입장 시간 (자세한 안내는 인스타그램 참조)",
description: "재학생 우선 입장 시간",
descriptionShow: true,
date: new Date("2024-09-24"),
startTime: new Date("2024-09-24 17:00"),
endTime: new Date("2024-09-24 17:50"),
link: {
text: "(자세히보기)",
url: "https://www.instagram.com/p/DAFpPQ_SQyL",
},
},
{
title: "전체 입장",
Expand All @@ -420,11 +428,15 @@ export const timeTableInfo: timeTableInfoProps[] = [
},
{
title: "재학생 우선 입장",
description: "재학생 우선 입장 시간 (자세한 안내는 인스타그램 참조)",
description: "재학생 우선 입장 시간",
descriptionShow: true,
date: new Date("2024-09-25"),
startTime: new Date("2024-09-25 17:00"),
endTime: new Date("2024-09-25 17:50"),
link: {
text: "(자세히보기)",
url: "https://www.instagram.com/p/DAFpPQ_SQyL",
},
},
{
title: "전체 입장",
Expand Down
1 change: 1 addition & 0 deletions src/shared/types/timeTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface timeTableInfoProps {
date: Date;
startTime: Date;
endTime: Date;
link?: { text: string; url: string };
}

export interface timeTableFilterProps {
Expand Down

0 comments on commit c109431

Please sign in to comment.