Skip to content

Commit 2ac4132

Browse files
committed
Prevent register in case of embedded
1 parent 3c5ce2a commit 2ac4132

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web/src/components/common/App.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ const AppBody = forwardRef((_props, ref) => {
372372
const appMode = useSelector((state: RootState) => state.settings.appMode)
373373
const isDevToolsOpen = useSelector((state: RootState) => state.settings.isDevToolsOpen)
374374
const variant = getParsedIframeInfo().variant
375+
const isEmbedded = getParsedIframeInfo().isEmbedded as unknown === 'true'
375376

376377
// Apply custom CSS throughout the application
377378
useCustomCSS()
@@ -381,6 +382,9 @@ const AppBody = forwardRef((_props, ref) => {
381382
}
382383
}, [])
383384
useEffect(() => {
385+
if (isEmbedded) {
386+
return
387+
}
384388
if (_.isUndefined(auth.session_jwt)) {
385389
authModule.register().then((data) => {
386390
const { session_jwt } = data

0 commit comments

Comments
 (0)