feat: env variable to disable signing up

This commit is contained in:
Navindu Amarakoon
2023-12-09 10:37:16 +05:30
parent b39a42ecd2
commit 323380d757
3 changed files with 20 additions and 6 deletions

View File

@ -1,8 +1,13 @@
import Link from 'next/link';
import { redirect } from 'next/navigation';
import { SignUpForm } from '~/components/forms/signup';
export default function SignUpPage() {
if (process.env.NEXT_PUBLIC_DISABLE_SIGNUP === 'true') {
redirect('/signin');
}
return (
<div>
<h1 className="text-4xl font-semibold">Create a new account</h1>