mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-12 01:26:21 +00:00
Implemented first elements of short codes list
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
import ServersService from '../services';
|
||||
import { LOAD_SERVER } from '../../reducers/types';
|
||||
import { LIST_SHORT_URLS } from '../../reducers/types';
|
||||
|
||||
export default function selectedServerReducer(state = null, action) {
|
||||
switch (action.type) {
|
||||
case LOAD_SERVER:
|
||||
case LIST_SHORT_URLS:
|
||||
return action.selectedServer;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
export const loadServer = serverId => {
|
||||
return {
|
||||
type: LOAD_SERVER,
|
||||
selectedServer: ServersService.findServerById(serverId),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user