From f445604e5ea9fc68eb8f542199494a9915940c74 Mon Sep 17 00:00:00 2001 From: Joooye_34 Date: Wed, 13 Sep 2023 11:19:00 +0800 Subject: [PATCH] fix(core): back home botton has no reaction (#4318) Co-authored-by: Alex Yang --- apps/core/src/pages/404.tsx | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/apps/core/src/pages/404.tsx b/apps/core/src/pages/404.tsx index 23bff79a78..9e23a54581 100644 --- a/apps/core/src/pages/404.tsx +++ b/apps/core/src/pages/404.tsx @@ -1,8 +1,8 @@ import { displayFlex, styled } from '@affine/component'; -import { WorkspaceSubPath } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { Button } from '@toeverything/components/button'; import type { ReactElement } from 'react'; +import { useCallback } from 'react'; import { useNavigateHelper } from '../hooks/use-navigate-helper'; @@ -26,22 +26,15 @@ export const StyledContainer = styled('div')(() => { export const NotFoundPage = () => { const t = useAFFiNEI18N(); - const { jumpToSubPath, jumpToIndex } = useNavigateHelper(); + const { jumpToIndex } = useNavigateHelper(); + const handleBackButtonClick = useCallback(() => jumpToIndex(), [jumpToIndex]); + return ( 404

{t['com.affine.notFoundPage.title']()}

-