diff --git a/src/components/article/ArticleDetail.vue b/src/components/article/ArticleDetail.vue
index 225fc3b..70394b4 100644
--- a/src/components/article/ArticleDetail.vue
+++ b/src/components/article/ArticleDetail.vue
@@ -4,6 +4,7 @@ import { useRoute } from 'vue-router';
import BoardHeader from './BoardHeader.vue';
import { getArticle } from '@/api/article';
import CommentArea from './CommentArea.vue';
+import { getComment } from '@/api/comment';
const route = useRoute();
@@ -14,30 +15,9 @@ const comments = ref([]);
getArticle(id, ({ data }) => {
article.value = data;
});
-
-// FIXME: remove mock data
-setTimeout(() => {
- article.value = {
- title: '제목',
- text: '내용',
- author: '작성자',
- date: '2024-04-11 13:12:14',
- };
- comments.value = [
- {
- id: 1,
- nickname: '닉네임',
- date: '2024-04-11 13:12:14',
- text: '댓글 내용',
- },
- {
- id: 2,
- nickname: '닉네임',
- date: '2024-04-11 13:12:14',
- text: '댓글 내용',
- },
- ];
-}, 100);
+getComment(id, ({ data }) => {
+ comments.value = data;
+});
@@ -46,7 +26,7 @@ setTimeout(() => {
{{ article.title }}
- {{ article.author }}
+ {{ article.name }}
{{ article.date }}
@@ -56,9 +36,9 @@ setTimeout(() => {
diff --git a/src/components/article/ArticleList.vue b/src/components/article/ArticleList.vue
index 6e69890..3d1bb3b 100644
--- a/src/components/article/ArticleList.vue
+++ b/src/components/article/ArticleList.vue
@@ -1,43 +1,52 @@
@@ -61,7 +70,7 @@ function pageChange(value) {
-
+