mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 22:37:04 +08:00
fix: logout will jump to 404 error
This commit is contained in:
@@ -51,26 +51,49 @@ export const LogoutModal = ({ open, onClose }: LoginModalProps) => {
|
|||||||
)}
|
)}
|
||||||
{t('Retain local cached data')}
|
{t('Retain local cached data')}
|
||||||
</StyleTips>
|
</StyleTips>
|
||||||
<div>
|
{blobDataSynced ? (
|
||||||
<Button
|
<div>
|
||||||
style={{ marginRight: '16px' }}
|
<Button
|
||||||
shape="round"
|
type="danger"
|
||||||
onClick={() => {
|
shape="round"
|
||||||
onClose(true);
|
style={{ marginRight: '16px' }}
|
||||||
}}
|
onClick={async () => {
|
||||||
>
|
onClose(false);
|
||||||
{t('Wait for Sync')}
|
}}
|
||||||
</Button>
|
>
|
||||||
<Button
|
{t('Force Sign Out')}
|
||||||
type="danger"
|
</Button>
|
||||||
shape="round"
|
<Button
|
||||||
onClick={() => {
|
shape="round"
|
||||||
onClose(false);
|
onClick={() => {
|
||||||
}}
|
onClose(true);
|
||||||
>
|
}}
|
||||||
{t('Force Sign Out')}
|
>
|
||||||
</Button>
|
{t('Wait for Sync')}
|
||||||
</div>
|
</Button>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
style={{ marginRight: '16px' }}
|
||||||
|
shape="round"
|
||||||
|
onClick={() => {
|
||||||
|
onClose(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Cancel')}
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
shape="round"
|
||||||
|
onClick={() => {
|
||||||
|
onClose(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('Sign out')}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Content>
|
</Content>
|
||||||
</ModalWrapper>
|
</ModalWrapper>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => {
|
|||||||
onClose={async wait => {
|
onClose={async wait => {
|
||||||
if (!wait) {
|
if (!wait) {
|
||||||
await logout();
|
await logout();
|
||||||
router.replace(`/workspace`);
|
router.push(`/workspace`);
|
||||||
}
|
}
|
||||||
setLogoutOpen(false);
|
setLogoutOpen(false);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user