From 028fdae8b1a94ab39a462d0915b233ce6f03fc4e Mon Sep 17 00:00:00 2001 From: DiamondThree <857159145@qq.com> Date: Tue, 7 Feb 2023 19:18:28 +0800 Subject: [PATCH] fix: logout will jump to 404 error --- .../app/src/components/logout-modal/index.tsx | 63 +++++++++++++------ .../src/components/workspace-modal/index.tsx | 2 +- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/packages/app/src/components/logout-modal/index.tsx b/packages/app/src/components/logout-modal/index.tsx index 19b6b04d93..d710b2e451 100644 --- a/packages/app/src/components/logout-modal/index.tsx +++ b/packages/app/src/components/logout-modal/index.tsx @@ -51,26 +51,49 @@ export const LogoutModal = ({ open, onClose }: LoginModalProps) => { )} {t('Retain local cached data')} -
- - -
+ {blobDataSynced ? ( +
+ + +
+ ) : ( +
+ + +
+ )} diff --git a/packages/app/src/components/workspace-modal/index.tsx b/packages/app/src/components/workspace-modal/index.tsx index 1363763c36..4dd552eaca 100644 --- a/packages/app/src/components/workspace-modal/index.tsx +++ b/packages/app/src/components/workspace-modal/index.tsx @@ -132,7 +132,7 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => { onClose={async wait => { if (!wait) { await logout(); - router.replace(`/workspace`); + router.push(`/workspace`); } setLogoutOpen(false); }}