mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-10 03:23:04 +00:00
Add persistent URL / stateful pagination for users
This commit is contained in:
@@ -2,7 +2,10 @@ import { combineReducers } from "redux";
|
||||
|
||||
export const initialState = {
|
||||
user_data: undefined,
|
||||
user_page: 0,
|
||||
groups_data: undefined,
|
||||
groups_page: 0,
|
||||
limit: 50,
|
||||
manage_groups_modal: false,
|
||||
};
|
||||
|
||||
@@ -10,6 +13,11 @@ export const reducers = (state = initialState, action) => {
|
||||
switch (action.type) {
|
||||
case "USER_DATA":
|
||||
return Object.assign({}, state, { user_data: action.value });
|
||||
case "USER_PAGE":
|
||||
return Object.assign({}, state, {
|
||||
user_page: action.value.page,
|
||||
user_data: action.value.data,
|
||||
});
|
||||
case "GROUPS_DATA":
|
||||
return Object.assign({}, state, { groups_data: action.value });
|
||||
case "TOGGLE_MANAGE_GROUPS_MODAL":
|
||||
|
Reference in New Issue
Block a user