-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moneyId ->cashId, moneyAmount ->money 로 변수명 변경 useCash훅에서 전역변수를 도입하여 불러낸 데이터를 저장하도록 변경 cashModal 기능을 변경 Issues #70
- Loading branch information
김병현
authored and
김병현
committed
Sep 16, 2023
1 parent
467ad0e
commit aa35233
Showing
5 changed files
with
130 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
// store/cashSlice.ts | ||
import { createSlice } from "@reduxjs/toolkit"; | ||
|
||
const cashSlice = createSlice({ | ||
name: "cash", | ||
initialState: { | ||
moneyId: null, | ||
moneyAmount: null, | ||
cashId: null, | ||
money: null, | ||
}, | ||
reducers: { | ||
setMoneyId: (state, action) => { | ||
state.moneyId = action.payload; | ||
setCashId: (state, action) => { | ||
state.cashId = action.payload; | ||
}, | ||
setMoneyAmount: (state, action) => { | ||
state.moneyAmount = action.payload; | ||
setMoney: (state, action) => { | ||
state.money = action.payload; | ||
}, | ||
}, | ||
}); | ||
|
||
export const { setMoneyId, setMoneyAmount } = cashSlice.actions; | ||
export default cashSlice.reducer; | ||
export const { setCashId, setMoney } = cashSlice.actions; | ||
export default cashSlice.reducer; |