Re-add redirect for unauthenticated users on home page

This commit is contained in:
2025-12-02 13:28:39 +00:00
parent b9b28ad92c
commit 855abb98b7

View File

@@ -5,11 +5,17 @@ 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()
if (!session?.user) {
redirect('/auth/login')
}
const lists = await getLists()
return (