mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-12 01:26:21 +00:00
Added behavior to mark active server in servers dropdown
This commit is contained in:
@@ -1,10 +1,16 @@
|
||||
import { LIST_SHORT_URLS } from '../../short-urls/reducers/shortUrlsList';
|
||||
|
||||
const RESET_SELECTED_SERVER = 'shlink/selectedServer/RESET_SELECTED_SERVER';
|
||||
|
||||
export default function reducer(state = null, action) {
|
||||
switch (action.type) {
|
||||
case LIST_SHORT_URLS:
|
||||
return action.selectedServer;
|
||||
case RESET_SELECTED_SERVER:
|
||||
return null;
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
export const resetSelectedServer = () => ({ type: RESET_SELECTED_SERVER });
|
||||
|
||||
Reference in New Issue
Block a user