Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design2
/
2015104215
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jaehyuk-jang
2021-06-11 02:00:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0af53dad0f8d529afb8282b2da5d7255827aa7bd
0af53dad
1 parent
5c9e841c
Fix page build error
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
29 deletions
project/docker_image/backend/deployment.yml
project/packages/web/pages/[name]/article.tsx
project/packages/web/pages/[name]/index.tsx
project/packages/web/pages/category/[name].tsx
project/packages/web/pages/category/index.tsx
project/packages/web/src/views/Post/Content/index.tsx
project/docker_image/backend/deployment.yml
View file @
0af53da
...
...
@@ -20,7 +20,7 @@ spec:
spec
:
containers
:
-
name
:
backend
image
:
khujay15/backend:1.
1
image
:
khujay15/backend:1.
2
ports
:
-
containerPort
:
5000
name
:
backend
...
...
project/packages/web/pages/[name]/article.tsx
View file @
0af53da
...
...
@@ -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, {
...
...
project/packages/web/pages/[name]/index.tsx
0 → 100644
View file @
0af53da
export { default } from './article';
\ No newline at end of file
project/packages/web/pages/category/[name].tsx
View file @
0af53da
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
...
...
project/packages/web/pages/category/index.tsx
0 → 100644
View file @
0af53da
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} />;
}
project/packages/web/src/views/Post/Content/index.tsx
View file @
0af53da
...
...
@@ -3,9 +3,7 @@ import { Card, Descriptions } from 'antd';
import moment from 'moment';
export default function Content({
id,
author,
category,
created_date,
title,
content,
...
...
Please
register
or
login
to post a comment