jaehyuk-jang

Fix page build error

......@@ -20,7 +20,7 @@ spec:
spec:
containers:
- name: backend
image: khujay15/backend:1.1
image: khujay15/backend:1.2
ports:
- containerPort: 5000
name: backend
......
......@@ -9,7 +9,7 @@ export default function ArticlePage() {
const { query } = useRouter();
if (!query.num) {
return null; // or redirect 404 ?
return <div>error!</div>
}
const { error, data } = useQuery(GET_POST_WITH_COMMENTS, {
......
export { default } from './article';
\ No newline at end of file
import { useRouter } from 'next/router';
import { useQuery } from '@apollo/client';
import { GET_SOME_POSTS } from '@src/gql/get-some-posts';
import Category from '@src/views/Category';
export default function CategoryPage() {
const {
query: { name },
} = useRouter();
const { error, data } = useQuery(GET_SOME_POSTS, {
variables: {
input: { category: name },
},
});
if (error) console.log(JSON.stringify(error, null, 2));
const getCategoryPosts = data?.getSomePosts || [];
const articleList = getCategoryPosts.filter((post) => post.category === name);
return <Category category={name} articleList={articleList} />;
}
export { default } from './index';
\ No newline at end of file
......
import { useRouter } from 'next/router';
import { useQuery } from '@apollo/client';
import { GET_SOME_POSTS } from '@src/gql/get-some-posts';
import Category from '@src/views/Category';
export default function CategoryPage() {
const {
query: { name },
} = useRouter();
const { error, data } = useQuery(GET_SOME_POSTS, {
variables: {
input: { category: name },
},
});
if (error) console.log(JSON.stringify(error, null, 2));
const getCategoryPosts = data?.getSomePosts || [];
const articleList = getCategoryPosts.filter((post) => post.category === name);
return <Category category={name} articleList={articleList} />;
}
......@@ -3,9 +3,7 @@ import { Card, Descriptions } from 'antd';
import moment from 'moment';
export default function Content({
id,
author,
category,
created_date,
title,
content,
......