From 58c065de068c9fe015d964c7d3541902a4753b9e Mon Sep 17 00:00:00 2001 From: bang9 Date: Tue, 27 Aug 2024 11:35:12 +0900 Subject: [PATCH] chore: update for qa --- src/main.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main.tsx b/src/main.tsx index ad8146042..894a910d8 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,8 +3,20 @@ import ReactDOM from 'react-dom/client'; import App from './App'; +const QA = () => { + const urlParams = new URLSearchParams(window.location.search); + const appId = urlParams.get('app_id') ?? import.meta.env.VITE_CHAT_WIDGET_APP_ID; + const botId = urlParams.get('bot_id') ?? import.meta.env.VITE_CHAT_WIDGET_BOT_ID; + + if (!appId || !botId) { + return null; + } + + return ; +}; + ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( - + , );