Fixed missing session response
This commit is contained in:
@@ -7,9 +7,11 @@ import { CreateNewButton } from "~/app/(home)/_components/create-new-button";
|
|||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
if (!session) {
|
if (!session) {
|
||||||
|
return (
|
||||||
<main>
|
<main>
|
||||||
<h1>Not signed in</h1>
|
<h1>Not signed in</h1>
|
||||||
</main>;
|
</main>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const allLists = await api.list.getAll();
|
const allLists = await api.list.getAll();
|
||||||
@@ -29,7 +31,7 @@ export default async function Home() {
|
|||||||
|
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
{allLists.map(({ id, title }) => (
|
{allLists.map(({ id, title }) => (
|
||||||
<ListButton key={id} id={id} title={title} />
|
<ListButton key={id} id={id!} title={title} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,9 +29,11 @@ async function getTasks() {
|
|||||||
export default async function Home() {
|
export default async function Home() {
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
if (!session) {
|
if (!session) {
|
||||||
|
return (
|
||||||
<main>
|
<main>
|
||||||
<h1>Not signed in</h1>
|
<h1>Not signed in</h1>
|
||||||
</main>;
|
</main>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const tasks = await getTasks();
|
const tasks = await getTasks();
|
||||||
|
|||||||
Reference in New Issue
Block a user