correct paging that /1 is shown in url

This commit is contained in:
Maren Süwer
2018-08-02 10:46:28 +02:00
parent efda5122f7
commit c4c85e6da6
2 changed files with 2 additions and 2 deletions

View File

@@ -51,7 +51,7 @@ class Groups extends React.Component<Props> {
*/
componentDidUpdate = (prevProps: Props) => {
const { page, list } = this.props;
if (list.page) {
if (list.page >= 0) {
// backend starts paging by 0
const statePage: number = list.page + 1;
if (page !== statePage) {

View File

@@ -52,7 +52,7 @@ class Users extends React.Component<Props> {
*/
componentDidUpdate = (prevProps: Props) => {
const { page, list } = this.props;
if (list.page) {
if (list.page >= 0) {
// backend starts paging by 0
const statePage: number = list.page + 1;
if (page !== statePage) {