From 8716113696520a65b9e71327dcfd4de250dd7310 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Wed, 19 Mar 2025 07:16:47 +0200 Subject: [PATCH] fix query --- src/components/Apps/AppViewer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/Apps/AppViewer.tsx b/src/components/Apps/AppViewer.tsx index cd9cf94..eb16e8d 100644 --- a/src/components/Apps/AppViewer.tsx +++ b/src/components/Apps/AppViewer.tsx @@ -26,7 +26,12 @@ export const AppViewer = React.forwardRef(({ app , hide, isDevMode, skipAuth}, i 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]) useEffect(()=> {