Skip to content

Commit

Permalink
feat: window 객체에 등록
Browse files Browse the repository at this point in the history
- Swift에서 setAccessToken 메서드를 호출하여 토큰을 저장해주기 위함
  • Loading branch information
BangDori committed Apr 27, 2024
1 parent 6e50249 commit 8addb2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/webview/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { setAccessToken } from '@/shared/store';

export function initWebViewInfo() {
window.setAccessToken = setAccessToken;
}
2 changes: 2 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -13,5 +14,6 @@ async function enableMocking() {
}

enableMocking().then(() => {
initWebViewInfo();
ReactDOM.createRoot(document.getElementById('root')!).render(<App />);
});

0 comments on commit 8addb2c

Please sign in to comment.