Commit 4c620d6b authored by Regis's avatar Regis

change example function in pagination component

parent 0b207930
...@@ -41,16 +41,14 @@ ...@@ -41,16 +41,14 @@
This is an example: This is an example:
const pageInfo = (headers) => { const pageInfo = headers => ({
const values = {}; perPage: +headers['X-Per-Page'],
values.perPage = +headers['X-Per-Page']; page: +headers['X-Page'],
values.page = +headers['X-Page']; total: +headers['X-Total'],
values.total = +headers['X-Total']; totalPages: +headers['X-Total-Pages'],
values.totalPages = +headers['X-Total-Pages']; nextPage: +headers['X-Next-Page'],
values.nextPage = +headers['X-Next-Page']; previousPage: +headers['X-Prev-Page'],
values.previousPage = +headers['X-Prev-Page']; });
return values;
};
*/ */
pageInfo: { pageInfo: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment