diff --git a/frontend/src/Widget.jsx b/frontend/src/Widget.jsx index 37417a4..9364cdc 100644 --- a/frontend/src/Widget.jsx +++ b/frontend/src/Widget.jsx @@ -254,8 +254,10 @@ function Widget() { useEffect(() => { console.log('window.location', window.location); + const { searchParams } = new URL(window.location.href); + const widgetId = searchParams.get('widgetId'); - widgetApi.current = widgetApi.current ?? new WidgetApi('50aaf929-a90d-4507-9ecc-cd0620d1c780'); + widgetApi.current = widgetApi.current ?? new WidgetApi(widgetId); console.log('widget api', widgetApi.current);