Skip to content

Commit

Permalink
fix: setState type 정확히 지정
Browse files Browse the repository at this point in the history
  • Loading branch information
simeunseo committed Jun 25, 2024
1 parent a5361e9 commit 64da00a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/pages/OverallSchedule/contexts/useClickContext.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createContext, useContext } from 'react';
import { Dispatch, SetStateAction, createContext, useContext } from 'react';

interface ClickContextType {
clickedSlot: string | undefined;
setClickedSlot: (clickedSlot?: string) => void;
setClickedSlot: Dispatch<SetStateAction<ClickContextType['clickedSlot']>>;
clickedUserNames: string[];
setClickedUserNames: (clickedUserNames: string[]) => void;
setClickedUserNames: Dispatch<SetStateAction<ClickContextType['clickedUserNames']>>;
}

export const ClickContext = createContext<ClickContextType>({
Expand Down
4 changes: 2 additions & 2 deletions src/pages/selectSchedule/contexts/useScheduleStepContext.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { createContext, useContext } from 'react';
import { Dispatch, SetStateAction, createContext, useContext } from 'react';

import { ScheduleStepType } from '../types';

interface ScheduleStepContextType {
scheduleStep: ScheduleStepType;
setScheduleStep: (scheduleStep: ScheduleStepType) => void;
setScheduleStep: Dispatch<SetStateAction<ScheduleStepType>>;
}

export const ScheduleStepContext = createContext<ScheduleStepContextType>({
Expand Down

0 comments on commit 64da00a

Please sign in to comment.