|
|
@@ -88,6 +88,14 @@ export default function ChatbotWidgetLive() {
|
|
|
}
|
|
|
}, [localMessages, isTyping]);
|
|
|
|
|
|
+ // Auto-open widget when redirected from Dealer Portal with SSO token
|
|
|
+ useEffect(() => {
|
|
|
+ if (ssoToken && !isOpen) {
|
|
|
+ handleOpen();
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
+ }, [ssoToken]);
|
|
|
+
|
|
|
const handleScroll = () => {
|
|
|
const el = scrollContainerRef.current;
|
|
|
if (!el) return;
|