fix query

This commit is contained in:
PhilReact 2025-03-19 07:16:47 +02:00
parent 694ace2190
commit 8716113696

View File

@ -26,7 +26,12 @@ export const AppViewer = React.forwardRef(({ app , hide, isDevMode, skipAuth}, i
return return
} }
setUrl(`${getBaseApiReact()}/render/${app?.service}/${app?.name}${app?.path != null ? `/${app?.path}` : ''}?theme=dark&identifier=${(app?.identifier != null && app?.identifier != 'null') ? app?.identifier : ''}`) let hasQueryParam = false
if(app?.path && app.path.includes('?')){
hasQueryParam = true
}
setUrl(`${getBaseApiReact()}/render/${app?.service}/${app?.name}${app?.path != null ? `/${app?.path}` : ''}${hasQueryParam ? "&": "?" }theme=dark&identifier=${(app?.identifier != null && app?.identifier != 'null') ? app?.identifier : ''}`)
}, [app?.service, app?.name, app?.identifier, app?.path, app?.isPreview]) }, [app?.service, app?.name, app?.identifier, app?.path, app?.isPreview])
useEffect(()=> { useEffect(()=> {