Start working on Auth flow. Made email templates for auth

This commit is contained in:
2025-05-23 13:51:42 -05:00
parent 7f78bc7123
commit 44a1ea8a37
10 changed files with 320 additions and 243 deletions

View File

@ -1,10 +1,14 @@
import Link from 'next/link';
import { signIn } from '@/lib/actions';
import { getUser, signIn } from '@/lib/actions';
import { FormMessage, type Message, SubmitButton } from '@/components/default';
import { Input, Label } from '@/components/ui';
import { redirect } from 'next/navigation';
import type { User } from '@/utils/supabase';
const Login = async (props: { searchParams: Promise<Message> }) => {
const searchParams = await props.searchParams;
const user = await getUser();
if (user.success) redirect('/profile');
return (
<form className='flex-1 flex flex-col min-w-64'>
<h1 className='text-2xl font-medium'>Sign in</h1>