From 919ab1ffc9a2edb5f66fb913fd1b9e4207e50d7e Mon Sep 17 00:00:00 2001 From: jhynsoo Date: Mon, 13 May 2024 16:59:50 +0900 Subject: [PATCH] Style: Remove unnecessary files --- src/components/article/ArticleDetail.vue | 17 --- src/components/article/ArticleList.vue | 20 --- src/components/article/ArticleRegist.vue | 129 ------------------ .../article/item/ArticleListItem.vue | 16 --- src/stores/counter.js | 12 -- src/views/ArticleView.vue | 10 -- src/views/BoardView.vue | 1 - 7 files changed, 205 deletions(-) delete mode 100644 src/components/article/ArticleRegist.vue delete mode 100644 src/components/article/item/ArticleListItem.vue delete mode 100644 src/stores/counter.js delete mode 100644 src/views/ArticleView.vue diff --git a/src/components/article/ArticleDetail.vue b/src/components/article/ArticleDetail.vue index 666530d..c625b6f 100644 --- a/src/components/article/ArticleDetail.vue +++ b/src/components/article/ArticleDetail.vue @@ -9,23 +9,6 @@ const route = useRoute(); const id = route.params.id; const article = ref({}); -// function mockAPI() { -// return new Promise((resolve) => { -// setTimeout(() => { -// resolve({ -// id, -// title: `Article title ${id}`, -// text: 'Article text 1\n\nasdfasdf asdf', -// author: 'asdf', -// comments: [], -// date: '2024-04-05 13:23', -// }); -// }); -// }); -// } - -// mockAPI().then((result) => (article.value = result)); - getArticle(id, ({ data }) => { article.value = data; }); diff --git a/src/components/article/ArticleList.vue b/src/components/article/ArticleList.vue index cac515a..4fe4736 100644 --- a/src/components/article/ArticleList.vue +++ b/src/components/article/ArticleList.vue @@ -5,26 +5,6 @@ import { RouterLink } from 'vue-router'; const articles = ref([]); -// function mockAPI() { -// return new Promise((resolve) => { -// setTimeout(() => { -// resolve( -// Array(20) -// .fill() -// .map((_, i) => ({ -// id: i + 1, -// title: `Article title ${i + 1}`, -// author: 'asdf', -// comments: i % 3 === 0 ? i : 0, -// date: '2024-04-05 13:23', -// })) -// ); -// }, 300); -// }); -// } - -// mockAPI().then((result) => (articles.value = result)); - getArticles(({ data }) => (articles.value = data)); diff --git a/src/components/article/ArticleRegist.vue b/src/components/article/ArticleRegist.vue deleted file mode 100644 index 093e53d..0000000 --- a/src/components/article/ArticleRegist.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - - - diff --git a/src/components/article/item/ArticleListItem.vue b/src/components/article/item/ArticleListItem.vue deleted file mode 100644 index 13b5841..0000000 --- a/src/components/article/item/ArticleListItem.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/src/stores/counter.js b/src/stores/counter.js deleted file mode 100644 index b6757ba..0000000 --- a/src/stores/counter.js +++ /dev/null @@ -1,12 +0,0 @@ -import { ref, computed } from 'vue' -import { defineStore } from 'pinia' - -export const useCounterStore = defineStore('counter', () => { - const count = ref(0) - const doubleCount = computed(() => count.value * 2) - function increment() { - count.value++ - } - - return { count, doubleCount, increment } -}) diff --git a/src/views/ArticleView.vue b/src/views/ArticleView.vue deleted file mode 100644 index 4d5dcb0..0000000 --- a/src/views/ArticleView.vue +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/src/views/BoardView.vue b/src/views/BoardView.vue index 0185609..801adeb 100644 --- a/src/views/BoardView.vue +++ b/src/views/BoardView.vue @@ -12,7 +12,6 @@ import AppHeader from '@/components/AppHeader.vue';