mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 12:19:10 +00:00
16 lines
512 B
JavaScript
16 lines
512 B
JavaScript
// @flow
|
|
import { namespaceConfig } from 'fast-redux'
|
|
// import { Map } from 'immutable'
|
|
|
|
const DEFAULT_STATE = {}
|
|
|
|
export type ServersState = typeof DEFAULT_STATE
|
|
|
|
export const { action, getState: getServerState } = namespaceConfig('servers', DEFAULT_STATE)
|
|
|
|
export const updateServers = action('updateServers', (state: ServersState, serverData) => ({
|
|
...state,
|
|
servers: serverData
|
|
}))
|
|
|
|
export const updateSingleServer = action('updateSingleServer', (state, data, server) => ({ ...state, [server]: data }))
|