Skip to content

Commit

Permalink
Create ActionTypes enum
Browse files Browse the repository at this point in the history
  • Loading branch information
lbebber committed Apr 4, 2019
1 parent df6d87b commit 60c29b2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions react/hooks/useCumulativeHeightState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ interface State {
[id: string]: number
}

enum ActionTypes {
UPDATE = 'update',
}
interface UpdateAction {
type: 'update'
type: ActionTypes.UPDATE,
payload: {
index: number
height: number
Expand Down Expand Up @@ -39,7 +42,7 @@ const useCumulativeHeightState = () => {
height,
index,
},
type: 'update',
type: ActionTypes.UPDATE,
})
}

Expand Down

0 comments on commit 60c29b2

Please sign in to comment.