diff --git a/src/main/main.ts b/src/main/main.ts index 3e73b51..7586d3a 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -351,6 +351,9 @@ app // dock icon is clicked and there are no other windows open. if (mainWindow === null) createWindow(); }); + + store.set('apikey', process.env.STARTGG_API_KEY); + // works for dumb iFrames session.defaultSession.webRequest.onHeadersReceived({ urls: [ diff --git a/src/renderer/components/VideoSearch.tsx b/src/renderer/components/VideoSearch.tsx index fd3d31a..8736084 100644 --- a/src/renderer/components/VideoSearch.tsx +++ b/src/renderer/components/VideoSearch.tsx @@ -231,9 +231,9 @@ const VideoSearch = () => { const [urlError, setUrlError] = useState(false); const [slugError, setSlugError] = useState(false); - const onChangeFunc = (value: any) => { - window.electron.store.set('apikey', value); - }; + // const onChangeFunc = (value: any) => { + // window.electron.store.set('apikey', value); + // }; useEffect(() => { if ( @@ -277,14 +277,14 @@ const VideoSearch = () => { }); return ( - - {HiddenTextField( + + {/* {HiddenTextField( 'Start.GG API Key', 'https://start.gg/admin/profile/developer', window.electron.store.get('apikey'), onChangeFunc, false - )} + )} */}