mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-20 21:46:20 +00:00
Updated reducers to follow Redux Reducer Bundles proposal
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { LIST_SHORT_URLS } from '../../reducers/types';
|
||||
import { LIST_SHORT_URLS } from '../../short-urls/reducers/shortUrlsList';
|
||||
|
||||
export default function selectedServerReducer(state = null, action) {
|
||||
export default function reducer(state = null, action) {
|
||||
switch (action.type) {
|
||||
case LIST_SHORT_URLS:
|
||||
return action.selectedServer;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import ServersService from '../services';
|
||||
import { FETCH_SERVERS, CREATE_SERVER } from '../../reducers/types';
|
||||
|
||||
export default function serversReducer(state = {}, action) {
|
||||
const FETCH_SERVERS = 'shlink/servers/FETCH_SERVERS';
|
||||
const CREATE_SERVER = 'shlink/servers/CREATE_SERVER';
|
||||
|
||||
export default function reducer(state = {}, action) {
|
||||
switch (action.type) {
|
||||
case FETCH_SERVERS:
|
||||
return action.servers;
|
||||
|
||||
Reference in New Issue
Block a user