mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 10:06:17 +08:00
feat: add new rule for floating promise (#2726)
Co-authored-by: Himself65 <himself65@outlook.com>
(cherry picked from commit bedf838fe5)
This commit is contained in:
@@ -34,7 +34,7 @@ export const NotfoundPage = () => {
|
||||
<Button
|
||||
shape="round"
|
||||
onClick={() => {
|
||||
router.push('/');
|
||||
router.push('/').catch(err => console.error(err));
|
||||
}}
|
||||
>
|
||||
{t['Back Home']()}
|
||||
|
||||
@@ -44,7 +44,7 @@ const InvitePage: NextPageWithLayout = () => {
|
||||
inviteData.workspace_id,
|
||||
WorkspaceSubPath.ALL,
|
||||
RouteLogic.REPLACE
|
||||
);
|
||||
).catch(err => console.error(err));
|
||||
}}
|
||||
>
|
||||
Go to Workspace
|
||||
@@ -64,7 +64,7 @@ const InvitePage: NextPageWithLayout = () => {
|
||||
<Button
|
||||
shape="round"
|
||||
onClick={() => {
|
||||
router.replace(`/`);
|
||||
router.replace(`/`).catch(err => console.error(err));
|
||||
}}
|
||||
>
|
||||
Back to Home
|
||||
|
||||
@@ -26,7 +26,7 @@ const AllPage: NextPageWithLayout = () => {
|
||||
if (newTab) {
|
||||
window.open(`/workspace/${currentWorkspace?.id}/${pageId}`, '_blank');
|
||||
} else {
|
||||
jumpToPage(currentWorkspace.id, pageId);
|
||||
jumpToPage(currentWorkspace.id, pageId).catch(console.error);
|
||||
}
|
||||
},
|
||||
[currentWorkspace, jumpToPage]
|
||||
|
||||
@@ -23,7 +23,7 @@ const SharedPages: NextPageWithLayout = () => {
|
||||
if (newTab) {
|
||||
window.open(`/workspace/${currentWorkspace?.id}/${pageId}`, '_blank');
|
||||
} else {
|
||||
jumpToPage(currentWorkspace.id, pageId);
|
||||
jumpToPage(currentWorkspace.id, pageId).catch(console.error);
|
||||
}
|
||||
},
|
||||
[currentWorkspace, jumpToPage]
|
||||
|
||||
@@ -24,7 +24,9 @@ const TrashPage: NextPageWithLayout = () => {
|
||||
if (newTab) {
|
||||
window.open(`/workspace/${currentWorkspace?.id}/${pageId}`, '_blank');
|
||||
} else {
|
||||
jumpToPage(currentWorkspace.id, pageId);
|
||||
jumpToPage(currentWorkspace.id, pageId).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
[currentWorkspace, jumpToPage]
|
||||
|
||||
Reference in New Issue
Block a user