From 4fda1fa0f2a821e9209c172790b32f38f0b67614 Mon Sep 17 00:00:00 2001 From: Dhravya Date: Sat, 29 Jun 2024 13:29:59 -0500 Subject: [PATCH] added comments in memories page --- apps/web/app/(dash)/memories/page.tsx | 9 +++++++++ apps/web/app/actions/doers.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/web/app/(dash)/memories/page.tsx b/apps/web/app/(dash)/memories/page.tsx index 74dd6d34..15a079fc 100644 --- a/apps/web/app/(dash)/memories/page.tsx +++ b/apps/web/app/(dash)/memories/page.tsx @@ -75,6 +75,11 @@ function Page() { content={(item.data as Content).content} title={(item.data as Content).title ?? "Untitled"} url={(item.data as Content).url} + image={ + (item.data as Content).ogImage ?? + (item.data as Content).image ?? + "/placeholder-image.svg" // TODO: add this placeholder + } /> ); } @@ -102,6 +107,7 @@ function TabComponent({ title: string; description: string; }) { + // TODO: Display the space name and desription which is the number of elemenet in the space return (
@@ -125,12 +131,15 @@ function LinkComponent({ content, title, url, + image, }: { type: string; content: string; title: string; url: string; + image?: string; }) { + // TODO: DISPLAY THE ITEM BASED ON `type` being note or page return (
{title}
diff --git a/apps/web/app/actions/doers.ts b/apps/web/app/actions/doers.ts index 0c4e98db..91a40f2c 100644 --- a/apps/web/app/actions/doers.ts +++ b/apps/web/app/actions/doers.ts @@ -38,7 +38,7 @@ export const createSpace = async ( try { const resp = await db .insert(space) - .values({ name: input, user: data.user.id }); + .values({ name: input, user: data.user.id, createdAt: new Date() }); revalidatePath("/home"); return { success: true, data: resp.meta.last_row_id };