From 6df80d32f3d7c8926d78723a02a7dfb8582d8345 Mon Sep 17 00:00:00 2001 From: Hocky Yudhiono Date: Thu, 29 Dec 2022 19:49:32 +0700 Subject: [PATCH] Fix console log --- main/background.ts | 4 ---- renderer/components/DataStructures.ts | 1 - renderer/pages/home.tsx | 28 +++++++++++++-------------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/main/background.ts b/main/background.ts index da86645..1eedb8d 100644 --- a/main/background.ts +++ b/main/background.ts @@ -197,10 +197,6 @@ if (isProd) { return okSetup; } - ipcMain.handle('getShunou', async (event, mecab, text) => { - return getFurigana(text, mecab) - }) - ipcMain.handle('getMecabCommand', async (event, mecab, text) => { return mecabCommand }) diff --git a/renderer/components/DataStructures.ts b/renderer/components/DataStructures.ts index 19b6bb2..968eb40 100644 --- a/renderer/components/DataStructures.ts +++ b/renderer/components/DataStructures.ts @@ -13,7 +13,6 @@ export class Line { this.timeEnd = end if (isInJapanese) { this.content = getFurigana(strContent, mecab) - console.log(this.content) } else { this.content = strContent } diff --git a/renderer/pages/home.tsx b/renderer/pages/home.tsx index 29ba3e2..f647759 100644 --- a/renderer/pages/home.tsx +++ b/renderer/pages/home.tsx @@ -9,8 +9,8 @@ const initialCheck = {ok: 0, message: 'Check is not run yet'} function Home() { const [dicdir, setDicdir] = useState(''); - const [mecab, setMecab] = useState('mecab'); - const [jmdict, setJmdict] = useState(''); + const [mecab, setMecab] = useState('/opt/homebrew/bin/mecab'); + const [jmdict, setJmdict] = useState('/Users/hocky/Downloads/jmdict-eng-3.2.0-alpha.1.json'); const [check, setCheck] = useState(initialCheck); return ( @@ -122,18 +122,18 @@ function Home() { Remove JMDict Cache - + {/* {*/} + {/* const text = '木ぃ切って 月収6万だろ~'*/} + {/* ipcRenderer.invoke('getShunou', mecab, text).then(val => {*/} + {/* console.log(val)*/} + {/* })*/} + {/* }*/} + {/* }>*/} + {/* tmp*/} + {/**/}