Skip to content

Commit

Permalink
Merge pull request #41 from BCSDLab/hotfix/typecheck
Browse files Browse the repository at this point in the history
Hotfix/typecheck
  • Loading branch information
ChoiWonBeen authored Jan 8, 2024
2 parents 5f2bae9 + 22aa902 commit 058d29a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/LINT_CHECK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ jobs:
run: yarn
- name: Check lint
run: yarn lint
- name: Type Check
run: yarn typecheck
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"eject": "react-scripts eject",
"lint": "yarn lint:eslint && yarn lint:stylelint",
"lint:eslint": "eslint src/ --ext .tsx,.ts",
"lint:stylelint": "stylelint \"src/**/*.scss\" --config .stylelint.json"
"lint:stylelint": "stylelint \"src/**/*.scss\" --config .stylelint.json",
"typecheck": "tsc --project tsconfig.json"
},
"eslintConfig": {
"extends": [
Expand Down
8 changes: 8 additions & 0 deletions src/store/modalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ interface ModalStore {
openTimeState: OperatingTime;
closeTimeState: OperatingTime;
shopClosedState: { [key: string]: boolean };
searchShopState: string; // 수정 요망
selectedShopId:string; // 수정 요망
setOpenTimeState: (state: OperatingTime) => void;
setCloseTimeState: (state: OperatingTime) => void;
setShopClosedState: (state: { [key: string]: boolean }) => void;
setSearchShopState: (state: string) => void; // 수정 요망
setSelectedShopId:(state:string) => void; // 수정 요망
}

const initialOperatingTime: OperatingTime = {
Expand All @@ -36,9 +40,13 @@ const useModalStore = create<ModalStore>((set) => ({
openTimeState: initialOperatingTime,
closeTimeState: initialOperatingTime,
shopClosedState: initialShopClosed,
searchShopState: '', // 수정 요망
selectedShopId: '', // 수정 요망
setOpenTimeState: (state) => set(() => ({ openTimeState: state })),
setCloseTimeState: (state) => set(() => ({ closeTimeState: state })),
setShopClosedState: (state) => set({ shopClosedState: state }),
setSearchShopState: (state) => set({ searchShopState: state }), // 수정 요망
setSelectedShopId: (state) => set({ selectedShopId: state }), // 수정 요망
}));

export default useModalStore;

0 comments on commit 058d29a

Please sign in to comment.