Skip to content

Commit 2779763

Browse files
committed
clean up
1 parent f413d30 commit 2779763

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

pages/category/[cid].js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ const CategoryPage = ({ posts, tags }) => {
2121
CategoryPage.getInitialProps = async ({ req }) => {
2222
const url = req.originalUrl.split("/")[2];
2323
const category_id = url == "all" ? "" : url.split("-")[0];
24-
// const postsRes = await getPosts({ category_id });
25-
// const tagsRes = await getMetas("tags");
2624

2725
let [respPosts, respTags] = await Promise.all([getPosts({ category_id }), getMetas("tags")]);
2826
let posts = respPosts.status == 200 ? [...respPosts.data] : [];
@@ -32,6 +30,7 @@ CategoryPage.getInitialProps = async ({ req }) => {
3230
tags[tag.id] = tag.slug;
3331
}
3432
}
33+
3534
return { posts, tags };
3635
};
3736

src/reducers/PostReducer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { ACTIONS } from "src/utils/consts";
22

33
const PostReducer = (state, action) => {
44
const { type, val } = action;
5-
65
switch (type) {
76
case ACTIONS.INIT_POSTS:
87
return { ...val };

0 commit comments

Comments
 (0)