mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat: add backhome
This commit is contained in:
@@ -1,10 +1,24 @@
|
||||
import { NotFoundTitle, PageContainer } from './styles';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { Button } from '@/ui/button';
|
||||
import { useRouter } from 'next/router';
|
||||
export const NotfoundPage = () => {
|
||||
const { t } = useTranslation();
|
||||
const router = useRouter();
|
||||
return (
|
||||
<PageContainer>
|
||||
<NotFoundTitle>{t('404 - Page Not Found')}</NotFoundTitle>
|
||||
<NotFoundTitle>
|
||||
{t('404 - Page Not Found')}
|
||||
<p>
|
||||
<Button
|
||||
onClick={() => {
|
||||
router.push('/workspace');
|
||||
}}
|
||||
>
|
||||
Back Home
|
||||
</Button>
|
||||
</p>
|
||||
</NotFoundTitle>
|
||||
</PageContainer>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import NotfoundPage from '@/components/404';
|
||||
import { useAppState } from '@/providers/app-state-provider';
|
||||
|
||||
export default function Custom404() {
|
||||
const { workspaceList } = useAppState();
|
||||
console.log('workspaceList: ', workspaceList);
|
||||
|
||||
return <NotfoundPage></NotfoundPage>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user