diff --git a/src/app/forum/[threadId]/page.tsx b/src/app/forum/[threadId]/page.tsx index c701464..296ecc5 100644 --- a/src/app/forum/[threadId]/page.tsx +++ b/src/app/forum/[threadId]/page.tsx @@ -74,12 +74,12 @@ export default function ThreadDetailPage() { if (loading) { return ( -
-
-
-
-
-
+
+
+
+
+
+
) @@ -87,91 +87,116 @@ export default function ThreadDetailPage() { if (error || !thread) { return ( -
- -
- -

{error || 'Thread not found'}

+
+ +

{error || 'Thread not found'}

) } return ( -
- +
+
+ -
-
- {thread.category.name} - {thread.shariahStatus === 'approved' ? ( - Shariah Approved + {/* Thread card */} +
+
+ + {thread.category.name} + + {thread.shariahStatus === 'approved' ? ( + + Shariah Approved + + ) : ( + + {thread.shariahStatus === 'pending' ? 'Pending Review' : 'Flagged'} + + )} +
+

{thread.title}

+

+ By {thread.author.name} · {new Date(thread.createdAt).toLocaleDateString()} +

+

{thread.content}

+
+ + {/* Replies section */} +
+

+ + Replies ({posts.length}) +

+ + {posts.length === 0 ? ( +
+

No replies yet. Be the first to respond.

+
) : ( - {thread.shariahStatus === 'pending' ? 'Pending Review' : 'Flagged'} + posts.map(post => ( +
+
+
+
+ {post.author.name[0]?.toUpperCase()} +
+ {post.author.name} +
+ {new Date(post.createdAt).toLocaleDateString()} +
+

{post.content}

+ {post.shariahStatus !== 'approved' && ( +
+ Pending shariah review +
+ )} +
+ )) )}
-

{thread.title}

-
- By {thread.author.name} · {new Date(thread.createdAt).toLocaleDateString()} -
-

{thread.content}

-
-
-

- - Replies ({posts.length}) -

- - {posts.length === 0 ? ( -
-

No replies yet. Be the first to respond.

-
+ {/* Reply form */} + {token ? ( +
+