From b751fcb6544b06fbc4626b42393cb085ed193967 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Wed, 1 Mar 2023 19:16:35 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=81=8C=E8=AA=A4=E3=81=A3=E3=81=A6=E8=A1=8C=E3=82=8F=E3=82=8C?= =?UTF-8?q?=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.vue | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 960dcb0..68a585e 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -16,8 +16,7 @@ window.localStorage.setItem("id", id); const endpoint = `https://memo-demo.hasura.app/api/rest/page/${id}`; const editor = ref(); -const initialContent = { ops: [{ insert: "読み込み中…" }] }; -const defaultContent = { +const initialContent = { ops: [ { insert: "メモ帳\n", attributes: { header: 1 } }, { insert: "こんにちは!\n" }, @@ -33,7 +32,7 @@ const defaultContent = { onMounted(async () => { console.log("endpoint", endpoint); const res = await axios.get(endpoint); - const content = res.data.page?.content ?? defaultContent; + const content = res.data.page?.content ?? initialContent; editor.value.setContents(content); console.log("content", content); }); @@ -45,10 +44,5 @@ const update = debounce(async (content) => {