Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
ederssouza committed Jun 10, 2023
1 parent 928e05b commit 22ba464
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/hooks/useCounter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ import { useSelector, useDispatch } from 'react-redux'
import { actions } from '../../redux/actions/counter'
import { selectors } from '../../redux/selectors/counter'

interface IUseCounter {
counter: number
handleDecrement: () => void
handleIncrement: () => void
}

export function useCounter (): IUseCounter {
export function useCounter () {
const counter = useSelector(selectors.getCounter)
const dispatch = useDispatch()

Expand Down
4 changes: 2 additions & 2 deletions src/redux/reducers/counter.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { actionTypes } from '../constants/counter'

interface IAction {
type Action = {
type: 'COUNTER_DECREMENT' | 'COUNTER_INCREMENT'
}

const INITIAL_STATE = {
counter: 0
}

export const counterReducers = (state = INITIAL_STATE, action: IAction) => {
export const counterReducers = (state = INITIAL_STATE, action: Action) => {
switch (action.type) {
case actionTypes.COUNTER_DECREMENT:
return {
Expand Down

0 comments on commit 22ba464

Please sign in to comment.