Start working on Auth flow. Made email templates for auth
This commit is contained in:
@ -2,9 +2,13 @@ import Link from 'next/link';
|
||||
import { signUp } from '@/lib/actions';
|
||||
import { FormMessage, type Message, SubmitButton } from '@/components/default';
|
||||
import { Input, Label } from '@/components/ui';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { getUser } from '@/lib/actions';
|
||||
|
||||
const SignUp = async (props: { searchParams: Promise<Message> }) => {
|
||||
const searchParams = await props.searchParams;
|
||||
const user = await getUser();
|
||||
if (user.success) redirect('/profile');
|
||||
if ('message' in searchParams) {
|
||||
return (
|
||||
<div
|
||||
|
Reference in New Issue
Block a user