diff --git a/client/coral-admin/src/actions/assets.js b/client/coral-admin/src/actions/stories.js
similarity index 93%
rename from client/coral-admin/src/actions/assets.js
rename to client/coral-admin/src/actions/stories.js
index d7c6d9448..536f478e1 100644
--- a/client/coral-admin/src/actions/assets.js
+++ b/client/coral-admin/src/actions/stories.js
@@ -4,11 +4,12 @@ import {
FETCH_ASSETS_REQUEST,
FETCH_ASSETS_SUCCESS,
FETCH_ASSETS_FAILURE,
+ SET_PAGE,
UPDATE_ASSET_STATE_REQUEST,
UPDATE_ASSET_STATE_SUCCESS,
UPDATE_ASSET_STATE_FAILURE,
UPDATE_ASSETS
-} from '../constants/assets';
+} from '../constants/stories';
import t from 'coral-framework/services/i18n';
@@ -52,3 +53,9 @@ export const updateAssetState = (id, closedAt) => (dispatch, _, {rest}) => {
export const updateAssets = (assets) => (dispatch) => {
dispatch({type: UPDATE_ASSETS, assets});
};
+
+export const setPage = (page) => ({
+ type: SET_PAGE,
+ page,
+});
+
diff --git a/client/coral-admin/src/constants/assets.js b/client/coral-admin/src/constants/assets.js
deleted file mode 100644
index 20ec0a9c3..000000000
--- a/client/coral-admin/src/constants/assets.js
+++ /dev/null
@@ -1,9 +0,0 @@
-export const FETCH_ASSETS_REQUEST = 'FETCH_ASSETS_REQUEST';
-export const FETCH_ASSETS_SUCCESS = 'FETCH_ASSETS_SUCCESS';
-export const FETCH_ASSETS_FAILURE = 'FETCH_ASSETS_FAILURE';
-
-export const UPDATE_ASSET_STATE_REQUEST = 'UPDATE_ASSET_STATE_REQUEST';
-export const UPDATE_ASSET_STATE_SUCCESS = 'UPDATE_ASSET_STATE_SUCCESS';
-export const UPDATE_ASSET_STATE_FAILURE = 'UPDATE_ASSET_STATE_FAILURE';
-
-export const UPDATE_ASSETS = 'UPDATE_ASSETS';
diff --git a/client/coral-admin/src/constants/stories.js b/client/coral-admin/src/constants/stories.js
new file mode 100644
index 000000000..52a9f9943
--- /dev/null
+++ b/client/coral-admin/src/constants/stories.js
@@ -0,0 +1,13 @@
+const prefix = 'STORIES';
+
+export const FETCH_ASSETS_REQUEST = `${prefix}_FETCH_ASSETS_REQUEST`;
+export const FETCH_ASSETS_SUCCESS = `${prefix}_FETCH_ASSETS_SUCCESS`;
+export const FETCH_ASSETS_FAILURE = `${prefix}_FETCH_ASSETS_FAILURE`;
+
+export const UPDATE_ASSET_STATE_REQUEST = `${prefix}_UPDATE_ASSET_STATE_REQUEST`;
+export const UPDATE_ASSET_STATE_SUCCESS = `${prefix}_UPDATE_ASSET_STATE_SUCCESS`;
+export const UPDATE_ASSET_STATE_FAILURE = `${prefix}_UPDATE_ASSET_STATE_FAILURE`;
+
+export const UPDATE_ASSETS = `${prefix}_UPDATE_ASSETS`;
+
+export const SET_PAGE = `${prefix}_SET_PAGE`;
diff --git a/client/coral-admin/src/reducers/index.js b/client/coral-admin/src/reducers/index.js
index 372fedbae..f7bbf3a3b 100644
--- a/client/coral-admin/src/reducers/index.js
+++ b/client/coral-admin/src/reducers/index.js
@@ -1,5 +1,5 @@
import auth from './auth';
-import assets from './assets';
+import stories from './stories';
import dashboard from './dashboard';
import configure from './configure';
import community from './community';
@@ -17,7 +17,7 @@ export default {
configure,
suspendUserDialog,
userDetail,
- assets,
+ stories,
community,
moderation,
install,
diff --git a/client/coral-admin/src/reducers/assets.js b/client/coral-admin/src/reducers/stories.js
similarity index 86%
rename from client/coral-admin/src/reducers/assets.js
rename to client/coral-admin/src/reducers/stories.js
index b4ea8d21f..60c02bc99 100644
--- a/client/coral-admin/src/reducers/assets.js
+++ b/client/coral-admin/src/reducers/stories.js
@@ -1,4 +1,4 @@
-import * as actions from '../constants/assets';
+import * as actions from '../constants/stories';
import update from 'immutability-helper';
const initialState = {
@@ -35,6 +35,11 @@ export default function assets (state = initialState, action) {
return update(state, {
assets: {$set: action.assets},
});
+ case actions.SET_PAGE:
+ return {
+ ...state,
+ page: action.page,
+ };
default:
return state;
}
diff --git a/client/coral-admin/src/routes/Community/components/People.js b/client/coral-admin/src/routes/Community/components/People.js
index 664173cb0..75d08429a 100644
--- a/client/coral-admin/src/routes/Community/components/People.js
+++ b/client/coral-admin/src/routes/Community/components/People.js
@@ -15,6 +15,7 @@ const People = (props) => {
onHeaderClickHandler,
onPageChange,
totalPages,
+ page,
setRole,
setCommenterStatus,
viewUserDetail,
@@ -48,6 +49,7 @@ const People = (props) => {
onHeaderClickHandler={onHeaderClickHandler}
pageCount={totalPages}
onPageChange={onPageChange}
+ page={page}
/>
:
|
- |
|