Skip to content

Commit 22ba464

Browse files
committed
Remove dead code
1 parent 928e05b commit 22ba464

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

src/hooks/useCounter/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ import { useSelector, useDispatch } from 'react-redux'
33
import { actions } from '../../redux/actions/counter'
44
import { selectors } from '../../redux/selectors/counter'
55

6-
interface IUseCounter {
7-
counter: number
8-
handleDecrement: () => void
9-
handleIncrement: () => void
10-
}
11-
12-
export function useCounter (): IUseCounter {
6+
export function useCounter () {
137
const counter = useSelector(selectors.getCounter)
148
const dispatch = useDispatch()
159

src/redux/reducers/counter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { actionTypes } from '../constants/counter'
22

3-
interface IAction {
3+
type Action = {
44
type: 'COUNTER_DECREMENT' | 'COUNTER_INCREMENT'
55
}
66

77
const INITIAL_STATE = {
88
counter: 0
99
}
1010

11-
export const counterReducers = (state = INITIAL_STATE, action: IAction) => {
11+
export const counterReducers = (state = INITIAL_STATE, action: Action) => {
1212
switch (action.type) {
1313
case actionTypes.COUNTER_DECREMENT:
1414
return {

0 commit comments

Comments
 (0)