diff --git a/frontend/routes/posts/[id].tsx b/frontend/routes/posts/[id].tsx
index 92e5e90..390663c 100644
--- a/frontend/routes/posts/[id].tsx
+++ b/frontend/routes/posts/[id].tsx
@@ -1,4 +1,6 @@
import { FreshContext, Handlers, PageProps } from "$fresh/server.ts";
+import { PostHeader } from "../../components/PostHeader.tsx";
+import { PostBody } from "../../components/PostBody.tsx";
interface PageData {
post_id: number;
@@ -24,5 +26,13 @@ export const handler: Handlers
= {
};
export default function PostIdentifier({ data }: PageProps) {
- return ;
+ const { postData } = data;
+ console.log(postData);
+
+ return (
+
+ );
}
diff --git a/frontend/routes/posts/index.tsx b/frontend/routes/posts/index.tsx
index 5ff08a2..48696cc 100644
--- a/frontend/routes/posts/index.tsx
+++ b/frontend/routes/posts/index.tsx
@@ -1,7 +1,7 @@
import { PostCarousel } from "../../components/PostCarousel.tsx";
import { Handlers, PageProps } from "$fresh/server.ts";
-import { Post } from "../../components/PostCard.tsx";
+import { Post } from "../../types/index.ts";
import * as hi from "jsr:@preact-icons/hi2";
interface PageData {
diff --git a/frontend/types/index.ts b/frontend/types/index.ts
new file mode 100644
index 0000000..329e9ec
--- /dev/null
+++ b/frontend/types/index.ts
@@ -0,0 +1,17 @@
+export type Post = {
+ post_id: number;
+ author_id: number;
+ first_name: string;
+ last_name: string;
+ title: string;
+ body: string;
+ created_at: string;
+};
+
+export type Author = {
+ author_id: number;
+ first_name: string;
+ last_name: string;
+ bio: string;
+ image?: string;
+};