You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
627 B
25 lines
627 B
// @flow
|
|
|
|
import type { Device } from 'types/common'
|
|
|
|
export type SetCurrentDevice = (Device | null) => { type: string, payload: Device | null }
|
|
export const setCurrentDevice: SetCurrentDevice = payload => ({
|
|
type: 'SET_CURRENT_DEVICE',
|
|
payload,
|
|
})
|
|
|
|
type AddDevice = Device => { type: string, payload: Device }
|
|
export const addDevice: AddDevice = payload => ({
|
|
type: 'ADD_DEVICE',
|
|
payload,
|
|
})
|
|
|
|
type RemoveDevice = Device => { type: string, payload: Device }
|
|
export const removeDevice: RemoveDevice = payload => ({
|
|
type: 'REMOVE_DEVICE',
|
|
payload,
|
|
})
|
|
|
|
export const resetDevices = () => ({
|
|
type: 'RESET_DEVICES',
|
|
})
|
|
|