Skip to content

Commit fc9ca34

Browse files
committed
segement result reducer add payload type
1 parent be2ca7f commit fc9ca34

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

apps/demo-game/src/reducers/SegmentResultReducer.ts

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,16 @@ type State = {
4242
returns?: AssetsTotal
4343
}
4444

45+
type PayloadType = {
46+
periodFacts: PeriodFacts
47+
segmentFacts: PeriodSegmentFacts
48+
segmentIx: number
49+
}
50+
4551
type Actions =
4652
| Action<ActionTypes.SEGMENT_RESULTS_INITIALIZE, {}, PrismaClient>
47-
| Action<
48-
ActionTypes.SEGMENT_RESULTS_START,
49-
{
50-
periodFacts: PeriodFacts
51-
segmentFacts: PeriodSegmentFacts
52-
segmentIx: number
53-
},
54-
PrismaClient
55-
>
56-
| Action<
57-
ActionTypes.SEGMENT_RESULTS_END,
58-
{
59-
periodFacts: PeriodFacts
60-
segmentFacts: PeriodSegmentFacts
61-
segmentIx: number
62-
},
63-
PrismaClient
64-
>
53+
| Action<ActionTypes.SEGMENT_RESULTS_START, PayloadType, PrismaClient>
54+
| Action<ActionTypes.SEGMENT_RESULTS_END, PayloadType, PrismaClient>
6555

6656
export function apply(state: State, action: Actions) {
6757
let newState = {

0 commit comments

Comments
 (0)