Skip to content

Commit e36df2a

Browse files
committed
chore(dashboard): undo refresh changes
1 parent 96a7374 commit e36df2a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

packages/apps/app-dashboard/src/components/user-dashboard/dashboard/RepermitConnectPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ export function RepermitConnectPage({
9898
if (effectiveRedirectUri) {
9999
await generateJWT(appData, appData.activeVersion!);
100100
} else {
101-
// Navigate to the app permissions page
102-
navigate(`/user/appId/${appData.appId}`);
101+
// Navigate to the app permissions page with full refresh to update sidebar
102+
window.location.href = `/user/appId/${appData.appId}`;
103103
}
104104
} catch (error) {
105105
setLocalError(error instanceof Error ? error.message : 'Failed to re-permit app');

packages/apps/app-dashboard/src/components/user-dashboard/dashboard/UpdateVersionPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ export function UpdateVersionPage({
125125
if (redirectUri) {
126126
await generateJWT(connectInfoMap.app, connectInfoMap.app.activeVersion!);
127127
} else {
128-
// Navigate to the app permissions page
129-
navigate(`/user/appId/${connectInfoMap.app.appId}`);
128+
// Navigate to the app permissions page with full refresh to update sidebar
129+
window.location.href = `/user/appId/${connectInfoMap.app.appId}`;
130130
}
131131
} catch (error) {
132132
setLocalError(error instanceof Error ? error.message : 'Failed to update version');

packages/apps/app-dashboard/src/components/user-dashboard/dashboard/UserPermissionPage.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { useState, useCallback, useRef, useEffect } from 'react';
2-
import { useNavigate } from 'react-router-dom';
32
import * as Sentry from '@sentry/react';
43
import { PKPEthersWallet } from '@lit-protocol/pkp-ethers';
54
import { IRelayPKP } from '@lit-protocol/types';
@@ -40,7 +39,6 @@ export function AppPermissionPage({
4039
appVersionsMap,
4140
onBackToConsent,
4241
}: AppPermissionPageProps) {
43-
const navigate = useNavigate();
4442
const appIdString = connectInfoMap.app.appId.toString();
4543
const permittedVersion = permittedAppVersions[appIdString];
4644

@@ -275,8 +273,8 @@ export function AppPermissionPage({
275273
setLocalStatus(null);
276274
// Show success state until redirect
277275
setLocalSuccess('App unpermitted successfully!');
278-
// Navigate to apps page
279-
navigate('/user/apps');
276+
// Force the refresh for the sidebar to update
277+
window.location.href = `/user/apps`;
280278
} catch (error) {
281279
setLocalError(error instanceof Error ? error.message : 'Failed to unpermit app');
282280
setLocalStatus(null);

0 commit comments

Comments
 (0)