const attendeesReducer = (state: any[], action: { type: string, payload: any}) => {
switch (action.type) {
case 'add':
return [...state, action.payload]
case 'remove':
return state.filter(i => i.id !== action.payload.id)
default:
return state
}
}
export default attendeesReducer