Skip to content

Commit

Permalink
refactor(time): refactor period constants & type (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
SWARVY committed Aug 14, 2024
1 parent 28e35d4 commit 02328a4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions apps/time/src/widgets/time-table/model/constants/period.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ const DAY_STATUS = {
night: '야간',
} as const;

const SPECIAL_PERIOD = ['이러닝', '교외수업', '사회봉사'] as const;

export {
DAY_PERIOD,
NIGHT_PERIOD,
SPECIAL_PERIOD,
DAY_PERIOD_ARRAY,
NIGHT_PERIOD_ARRAY,
DAY_STATUS,
Expand Down
8 changes: 4 additions & 4 deletions apps/time/src/widgets/time-table/types/period.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DAY_PERIOD, NIGHT_PERIOD } from '@/widgets/time-table';
import { DAY_PERIOD, NIGHT_PERIOD, SPECIAL_PERIOD } from '@/widgets/time-table';

type DayPeriod = keyof typeof DAY_PERIOD;
export type SpecialPeriod = (typeof SPECIAL_PERIOD)[number];

type NightPeriod = keyof typeof NIGHT_PERIOD;
export type DayPeriod = keyof typeof DAY_PERIOD | SpecialPeriod;

export type { DayPeriod, NightPeriod };
export type NightPeriod = keyof typeof NIGHT_PERIOD | SpecialPeriod;

0 comments on commit 02328a4

Please sign in to comment.