2023-09-05 13:15:45 +10:00
|
|
|
import Link from 'next/link';
|
2023-09-03 23:53:07 +05:30
|
|
|
|
2024-08-27 20:34:39 +09:00
|
|
|
import { Trans } from '@lingui/macro';
|
|
|
|
|
|
|
|
|
|
import { setupI18nSSR } from '@documenso/lib/client-only/providers/i18n.server';
|
2023-11-16 07:35:45 +05:30
|
|
|
import { getServerComponentSession } from '@documenso/lib/next-auth/get-server-component-session';
|
2023-09-03 23:53:07 +05:30
|
|
|
import { Button } from '@documenso/ui/primitives/button';
|
|
|
|
|
|
2023-09-05 13:15:45 +10:00
|
|
|
import NotFoundPartial from '~/components/partials/not-found';
|
|
|
|
|
|
|
|
|
|
export default async function NotFound() {
|
2024-08-27 20:34:39 +09:00
|
|
|
setupI18nSSR();
|
|
|
|
|
|
2023-09-28 17:32:31 +10:00
|
|
|
const { session } = await getServerComponentSession();
|
2023-09-03 23:53:07 +05:30
|
|
|
|
|
|
|
|
return (
|
2023-09-05 13:15:45 +10:00
|
|
|
<NotFoundPartial>
|
|
|
|
|
{session && (
|
|
|
|
|
<Button className="w-32" asChild>
|
2024-08-27 20:34:39 +09:00
|
|
|
<Link href="/documents">
|
|
|
|
|
<Trans>Documents</Trans>
|
|
|
|
|
</Link>
|
2023-09-05 13:15:45 +10:00
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
{!session && (
|
|
|
|
|
<Button className="w-32" asChild>
|
2024-08-27 20:34:39 +09:00
|
|
|
<Link href="/signin">
|
|
|
|
|
<Trans>Sign In</Trans>
|
|
|
|
|
</Link>
|
2023-09-05 13:15:45 +10:00
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
</NotFoundPartial>
|
2023-09-03 23:53:07 +05:30
|
|
|
);
|
|
|
|
|
}
|