mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Number of posts per page is now configurable through .env
This commit is contained in:
@@ -5,6 +5,8 @@ import { FiltersState } from './filtersReducer';
|
||||
import postReducer from './postReducer';
|
||||
import filtersReducer from './filtersReducer';
|
||||
|
||||
import { POSTS_PER_PAGE } from '../constants';
|
||||
|
||||
import {
|
||||
PostsRequestActionTypes,
|
||||
POSTS_REQUEST_START,
|
||||
@@ -60,7 +62,7 @@ const postsReducer = (
|
||||
:
|
||||
[...state.items, ...action.posts.map(post => postReducer(undefined, postRequestSuccess(post)))],
|
||||
page: action.page,
|
||||
haveMore: action.posts.length === 15,
|
||||
haveMore: action.posts.length === POSTS_PER_PAGE,
|
||||
areLoading: false,
|
||||
error: '',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user