feat: add backhome
This commit is contained in:
@@ -1,10 +1,24 @@
|
|||||||
import { NotFoundTitle, PageContainer } from './styles';
|
import { NotFoundTitle, PageContainer } from './styles';
|
||||||
import { useTranslation } from '@affine/i18n';
|
import { useTranslation } from '@affine/i18n';
|
||||||
|
import { Button } from '@/ui/button';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
export const NotfoundPage = () => {
|
export const NotfoundPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const router = useRouter();
|
||||||
return (
|
return (
|
||||||
<PageContainer>
|
<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>
|
</PageContainer>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
import NotfoundPage from '@/components/404';
|
import NotfoundPage from '@/components/404';
|
||||||
import { useAppState } from '@/providers/app-state-provider';
|
|
||||||
|
|
||||||
export default function Custom404() {
|
export default function Custom404() {
|
||||||
const { workspaceList } = useAppState();
|
|
||||||
console.log('workspaceList: ', workspaceList);
|
|
||||||
|
|
||||||
return <NotfoundPage></NotfoundPage>;
|
return <NotfoundPage></NotfoundPage>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user