Skip to content

Commit ce5f781

Browse files
committed
refactor: production 에서만 댓글 보이도록 수정
1 parent af4b963 commit ce5f781

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/PostComment/PostComment.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { computed } from "vue";
33
import { useData } from "vitepress";
44
import Giscus from "@giscus/vue";
5+
import { isProduction } from "@/constants/env";
56
67
const GISCUS = {
78
repo: "toothlessdev/toothlessdev.github.io",
@@ -18,7 +19,7 @@ const uiLang = computed(() => (lang.value?.startsWith("ko") ? "ko" : "en"));
1819
</script>
1920

2021
<template>
21-
<div class="giscus-comments">
22+
<div class="giscus-comments" v-if="isProduction">
2223
<Giscus
2324
class="giscus"
2425
:repo="GISCUS.repo"

src/constants/env.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const isProduction = process.env.NODE_ENV === "production";

0 commit comments

Comments
 (0)