mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +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:
@@ -43,7 +43,7 @@ export const MessageCenter: FC = memo(function MessageCenter() {
|
||||
})
|
||||
.catch(() => {
|
||||
setPopup(false);
|
||||
onLogout();
|
||||
return onLogout();
|
||||
});
|
||||
} else {
|
||||
toast(Messages[event.detail.code].message);
|
||||
|
||||
@@ -64,9 +64,11 @@ export const PublishedResults: FC<PublishedResultsProps> = ({
|
||||
<Command.Item
|
||||
key={result.id}
|
||||
onSelect={() => {
|
||||
router.push(
|
||||
`/public-workspace/${router.query.workspaceId}/${result.id}`
|
||||
);
|
||||
router
|
||||
.push(
|
||||
`/public-workspace/${router.query.workspaceId}/${result.id}`
|
||||
)
|
||||
.catch(err => console.error(err));
|
||||
onClose();
|
||||
}}
|
||||
value={result.id}
|
||||
|
||||
@@ -71,7 +71,9 @@ export const Results: FC<ResultsProps> = ({
|
||||
value={page.id}
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
jumpToPage(blockSuiteWorkspace.id, page.id);
|
||||
jumpToPage(blockSuiteWorkspace.id, page.id).catch(
|
||||
console.error
|
||||
);
|
||||
}}
|
||||
>
|
||||
<StyledListItem>
|
||||
@@ -95,7 +97,7 @@ export const Results: FC<ResultsProps> = ({
|
||||
value={link.title}
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
router.push(link.href);
|
||||
router.push(link.href).catch(console.error);
|
||||
}}
|
||||
>
|
||||
<StyledListItem>
|
||||
@@ -133,7 +135,9 @@ export const Results: FC<ResultsProps> = ({
|
||||
onSelect={() => {
|
||||
onClose();
|
||||
assertExists(blockSuiteWorkspace.id);
|
||||
jumpToPage(blockSuiteWorkspace.id, result.id);
|
||||
jumpToPage(blockSuiteWorkspace.id, result.id).catch(error =>
|
||||
console.error(error)
|
||||
);
|
||||
}}
|
||||
value={result.id}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user