diff --git a/source/src/pages/PostList/index.tsx b/source/src/pages/PostList/index.tsx index 5d2a51e..6e51030 100644 --- a/source/src/pages/PostList/index.tsx +++ b/source/src/pages/PostList/index.tsx @@ -36,11 +36,11 @@ const PostList = (props: Props) => { const [postsLength, setPostsLength] = useState(0) const [postCards, setPostCards] = useState([]) - const loadPostCards = () => { + function loadPostCards() { let postCount = 0 const postCards = [] as JSX.Element[] - for (const date in map.date) { + for (const date of Object.keys(map.date).reverse()) { if (postCount >= howMany) break const length = map.date[date].length