From 8addb2c98a3b02cb78c97cca7cdaf7ad730db08b Mon Sep 17 00:00:00 2001 From: BangDori Date: Sat, 27 Apr 2024 19:04:44 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20window=20=EA=B0=9D=EC=B2=B4=EC=97=90=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Swift에서 setAccessToken 메서드를 호출하여 토큰을 저장해주기 위함 --- src/app/webview/index.ts | 5 +++++ src/main.tsx | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 src/app/webview/index.ts diff --git a/src/app/webview/index.ts b/src/app/webview/index.ts new file mode 100644 index 0000000..1a5250c --- /dev/null +++ b/src/app/webview/index.ts @@ -0,0 +1,5 @@ +import { setAccessToken } from '@/shared/store'; + +export function initWebViewInfo() { + window.setAccessToken = setAccessToken; +} diff --git a/src/main.tsx b/src/main.tsx index 4792d00..2b85e72 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,6 +1,7 @@ import ReactDOM from 'react-dom/client'; import App from './app/App'; +import { initWebViewInfo } from './app/webview'; async function enableMocking() { if (import.meta.env.PROD) { @@ -13,5 +14,6 @@ async function enableMocking() { } enableMocking().then(() => { + initWebViewInfo(); ReactDOM.createRoot(document.getElementById('root')!).render(); });