import { ADD_TODO , CLEAR_TODO , DELETE_TODO , FETCH_TODO , SEARCH_TODO , UPDATE_TODO_CONTENT , UPDATE_TODO_STATUS , } from './types' ; export const addTodo = ( userId , content ) => ( { type : ADD_TODO , payload : { userId , content } , } ) ; export const fetchTodo = ( userId ) => ( { type : FETCH_TODO , payload : { userId } , } ) ; export const searchTodo = ( userId , query ) => ( { type : SEARCH_TODO , payload : { userId , query } , } ) ; export const deleteTodo = ( todoId ) => ( { type : DELETE_TODO , payload : { todoId } , } ) ; export const updateTodoStatus = ( todoId ) => ( { type : UPDATE_TODO_STATUS , payload : { todoId } , } ) ; export const updateTodoContent = ( todoId , content ) => ( { type : UPDATE_TODO_CONTENT , payload : { todoId , content } , } ) ; export const clearTodo = ( ) => ( { type : CLEAR_TODO , } ) ;