From 2980395ed259a67adc171a98d15629a5df9aff7a Mon Sep 17 00:00:00 2001 From: PhilReact Date: Wed, 19 Mar 2025 07:17:40 +0200 Subject: [PATCH] fix query --- src/components/Apps/AppViewer.tsx | 10 ++++++---- src/components/Group/WalletsAppWrapper.tsx | 9 +++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/Apps/AppViewer.tsx b/src/components/Apps/AppViewer.tsx index cd9cf94..11188a9 100644 --- a/src/components/Apps/AppViewer.tsx +++ b/src/components/Apps/AppViewer.tsx @@ -25,8 +25,12 @@ export const AppViewer = React.forwardRef(({ app , hide, isDevMode, skipAuth}, i setUrl(app?.url) 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(()=> { @@ -44,7 +48,6 @@ export const AppViewer = React.forwardRef(({ app , hide, isDevMode, skipAuth}, i const {tabId} = e.detail if(tabId === app?.tabId){ if(isDevMode){ - resetHistory() if(!app?.isPreview || app?.isPrivate){ setUrl(app?.url + `?time=${Date.now()}`) @@ -52,7 +55,6 @@ export const AppViewer = React.forwardRef(({ app , hide, isDevMode, skipAuth}, i return } - const constructUrl = `${getBaseApiReact()}/render/${app?.service}/${app?.name}${path != null ? path : ''}?theme=dark&identifier=${app?.identifier != null ? app?.identifier : ''}&time=${new Date().getMilliseconds()}` setUrl(constructUrl) } diff --git a/src/components/Group/WalletsAppWrapper.tsx b/src/components/Group/WalletsAppWrapper.tsx index 00218a7..788a36a 100644 --- a/src/components/Group/WalletsAppWrapper.tsx +++ b/src/components/Group/WalletsAppWrapper.tsx @@ -29,7 +29,7 @@ export const WalletsAppWrapper = () => { tabId: "5558589", name: "Q-Wallets", service: "APP", - path: '/qortal' + path: 'qortal?authOnMount=true' }); const isDisableBackButton = useMemo(() => { @@ -66,11 +66,8 @@ export const WalletsAppWrapper = () => {