Fixed missing session response

This commit is contained in:
2024-11-23 09:30:15 -06:00
parent 30f44c75b5
commit 42ee36058e
2 changed files with 11 additions and 7 deletions

View File

@@ -7,9 +7,11 @@ import { CreateNewButton } from "~/app/(home)/_components/create-new-button";
export default async function Home() {
const session = await auth();
if (!session) {
<main>
<h1>Not signed in</h1>
</main>;
return (
<main>
<h1>Not signed in</h1>
</main>
);
}
const allLists = await api.list.getAll();
@@ -29,7 +31,7 @@ export default async function Home() {
<div className="space-y-1">
{allLists.map(({ id, title }) => (
<ListButton key={id} id={id} title={title} />
<ListButton key={id} id={id!} title={title} />
))}
</div>
</div>

View File

@@ -29,9 +29,11 @@ async function getTasks() {
export default async function Home() {
const session = await auth();
if (!session) {
<main>
<h1>Not signed in</h1>
</main>;
return (
<main>
<h1>Not signed in</h1>
</main>
);
}
const tasks = await getTasks();