Skip to content

Commit

Permalink
Update useTodoActions.ts
Browse files Browse the repository at this point in the history
Signed-off-by: Tuan Duc Tran <[email protected]>
  • Loading branch information
tuanductran authored Jun 15, 2024
1 parent 11559b6 commit d8f3547
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/hooks/useTodoActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ const useTodoActions = () => {
data: todos,
error,
mutate
} = useSWR<Todo[]>('/api/todos', getTodos, {
refreshInterval: 1000,
revalidateOnFocus: true,
dedupingInterval: 2000,
shouldRetryOnError: true
})
} = useSWR<Todo[]>('/api/todos', getTodos, { refreshInterval: 1000 })

const [state, dispatch] = useReducer(todoReducer, {
todos: [],
Expand Down

1 comment on commit d8f3547

@vercel
Copy link

@vercel vercel bot commented on d8f3547 Jun 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.