aboutsummaryrefslogtreecommitdiff
path: root/apps/web/app/(dash)/home/page.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/app/(dash)/home/page.tsx')
-rw-r--r--apps/web/app/(dash)/home/page.tsx15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/web/app/(dash)/home/page.tsx b/apps/web/app/(dash)/home/page.tsx
index 7a6bb94f..55f2928e 100644
--- a/apps/web/app/(dash)/home/page.tsx
+++ b/apps/web/app/(dash)/home/page.tsx
@@ -2,8 +2,8 @@ import React from "react";
import Menu from "../menu";
import Header from "../header";
import QueryInput from "./queryinput";
-import { homeSearchParamsCache } from "@/app/helpers/lib/searchParams";
-import { getSpaces } from "../actions";
+import { homeSearchParamsCache } from "@/lib/searchParams";
+import { getSpaces } from "@/app/actions/fetchers";
async function Page({
searchParams,
@@ -13,15 +13,20 @@ async function Page({
// TODO: use this to show a welcome page/modal
const { firstTime } = homeSearchParamsCache.parse(searchParams);
- const spaces = await getSpaces();
+ let spaces = await getSpaces();
+
+ if (!spaces.success) {
+ // TODO: handle this error properly.
+ spaces.data = [];
+ }
return (
- <div className="max-w-3xl flex mx-auto w-full flex-col">
+ <div className="max-w-3xl h-full justify-center flex mx-auto w-full flex-col">
{/* all content goes here */}
{/* <div className="">hi {firstTime ? 'first time' : ''}</div> */}
<div className="w-full h-96">
- <QueryInput initialSpaces={spaces} />
+ <QueryInput initialSpaces={spaces.data} />
</div>
</div>
);