Remove manual redirect from home page - let middleware handle auth

- Middleware already handles authentication redirects
- Prevents error boundary from catching redirect errors
- Cleaner separation of concerns
This commit is contained in:
2025-12-02 13:17:12 +00:00
parent ce7021e3fa
commit f3d9ccde56

View File

@@ -5,18 +5,11 @@ import GlobalSearch from '@/components/GlobalSearch'
import EmptyState from '@/components/EmptyState'
import Link from 'next/link'
import { auth } from '@/auth'
import { redirect } from 'next/navigation'
export const dynamic = 'force-dynamic'
export default async function Home() {
const session = await auth()
// Redirect to login if not authenticated
if (!session?.user) {
redirect('/auth/login')
}
const lists = await getLists()
return (