+
+
+
Discussion feed
+
+ Search, filter, and follow the most active conversations.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {categoryPresets.map((category) => (
+
+ ))}
+
+
+
+ {isAuthenticated ? null : (
+
+ You can read discussions without signing in, but posting, editing, commenting, and liking require a logged-in session.
+
+ )}
+
+ {error ? (
+
+ {isLoading ? (
+
+ Loading community feed...
+
+ ) : discussions.length === 0 ? (
+
+ No discussions found. Start the first thread in this category.
+
+ ) : (
+ discussions.map((discussion) => (
+
+
+
+
+
+
+ {discussion.category}
+
+ {discussion.author.name}
+ •
+ {formatDate(discussion.createdAt)}
+
+
+
{discussion.title}
+
+ {discussion.body}
+
+
+
+ {discussion.tags.map((tag) => (
+
+ #{tag}
+
+ ))}
+
+
+
+
+
+
+
+
+ {discussion.commentsCount}
+
+
+ {discussion.canEdit ? (
+
+
+
+
+ ) : null}
+
+
+
+
+
+
+ Comments
+
+
+
+ {discussion.comments.length === 0 ? (
+
No comments yet. Start the conversation.
+ ) : (
+ discussion.comments.slice(0, 3).map((comment) => (
+
+
+ {comment.author.name}
+ •
+ {formatDate(comment.createdAt)}
+
+
{comment.text}
+
+ ))
+ )}
+
+
+
+
+ setCommentDrafts((current) => ({
+ ...current,
+ [discussion.id]: event.target.value,
+ }))
+ }
+ placeholder="Write a reply..."
+ className="flex-1 rounded-2xl border border-slate-200 bg-white px-4 py-3 text-sm outline-none transition focus:border-cyan-500 dark:border-slate-800 dark:bg-slate-900"
+ />
+
+
+
+
+ ))
+ )}
+
+