Skip to content
Merged

Rc #121

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
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no, viewport-fit=cover" />
<meta name="theme-color" content="#F9F0F0" />
<meta property="og:title" content="OTL - Online Timetable with Lectures" />
<meta property="og:description" content="카이스트 학생들을 위한 시간표 서비스입니다" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="OTL" />
<meta property="og:image" content="https://otl.kaist.ac.kr/static/favicon-192.png" />
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
Expand Down
5 changes: 2 additions & 3 deletions src/components/sections/main/TodaysTimetableSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import queryString from 'qs';
import { range } from 'lodash';

import { appBoundClassNames as classNames } from '../../../common/boundClassNames';
import { TIMETABLE_START_HOUR, TIMETABLE_END_HOUR } from '../../../common/constants';
import { TIMETABLE_END_HOUR, TIMETABLE_START_HOUR } from '../../../common/constants';

import Scroller from '../../Scroller';

Expand Down Expand Up @@ -89,8 +89,7 @@ class TodaysTimetableSection extends Component {
const { cellWidth, cellHeight, now } = this.state;
const { user, semesters, currentSemester } = this.props;
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The currentSemester prop is destructured from this.props but is no longer used after the logic change on line 92. This unused variable should be removed from the destructuring statement to keep the code clean.

Suggested change
const { user, semesters, currentSemester } = this.props;
const { user, semesters } = this.props;

Copilot uses AI. Check for mistakes.

const ongoingSemester =
currentSemester || (semesters ? getOngoingSemester(semesters) : undefined);
const ongoingSemester = semesters ? getOngoingSemester(semesters) : undefined;
const lectures =
user && ongoingSemester
? user.my_timetable_lectures.filter(
Expand Down
12 changes: 12 additions & 0 deletions src/redux/actions/common/semester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@ export const SET_CURRENT_SEMESTER = `${BASE_STRING}SET_CURRENT_SEMESTER` as cons

import Semester from '@/shapes/model/subject/Semester';

/**
* Creates an action to set the list of semesters in the state.
*
* @param semesters - The array of Semester objects to set
* @returns An action object with type SET_SEMESTERS and the semesters payload
*/
export function setSemesters(semesters: Semester[]) {
return {
type: SET_SEMESTERS,
semesters: semesters,
};
}

/**
* Creates an action to set the current semester in the state.
*
* @param semester - The semester to be set as current
* @returns An action object with type `SET_CURRENT_SEMESTER` and the specified semester
*/
export function setCurrentSemester(semester: Semester) {
return {
type: SET_CURRENT_SEMESTER,
Expand Down
Loading