Spaces:
Sleeping
Sleeping
File size: 709 Bytes
b841f1a c69ef3e 60612a5 76fdff4 60612a5 f80b091 76fdff4 f80b091 76fdff4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import { auth } from '@/auth';
import { redirect } from 'next/navigation';
import { Button } from '@/components/ui/Button';
import Link from 'next/link';
export default async function Unauthorized() {
const session = await auth();
// redirect to home if user is already logged in
if (session?.user) {
redirect('/');
}
return (
<div className="flex flex-col h-[calc(100vh-theme(spacing.16))] items-center justify-center py-10 space-y-2">
<div>
You are not authorized to view this page. Please sign in with Landing
account to continue.
</div>
<Button asChild className="mt-16">
<Link href="/sign-in">Sign in</Link>
</Button>
</div>
);
}
|