23 |
24 | {posts
25 | .slice((currentPage - 1) * perPage, currentPage * perPage)
26 | .map((post, i) => (
27 |
34 | ))}
35 |
36 |
37 |
Router.push(`/blog?page=${page}`)}
42 | />
43 |
44 |
54 |
55 | );
56 | }
57 | );
58 |
59 | export default StubList;
60 |
--------------------------------------------------------------------------------
/src/components/post-body.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 | import dayjs from 'dayjs';
4 |
5 | const PostBody = ({ children, post, title, className }) => (
6 |