From 8d91ee54430f27ba79550d4550a818447297c9dd Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 18 Oct 2025 21:16:04 +0000 Subject: [PATCH] Prettier format pending files --- client/components/social/FeedItemCard.tsx | 35 +++++++++++++++++------ client/components/social/PostComposer.tsx | 12 ++++++-- client/pages/Feed.tsx | 8 ++++-- client/pages/Staff.tsx | 13 +++++++-- server/index.ts | 8 ++++-- 5 files changed, 59 insertions(+), 17 deletions(-) diff --git a/client/components/social/FeedItemCard.tsx b/client/components/social/FeedItemCard.tsx index 7b7ce8fc..a4a913b8 100644 --- a/client/components/social/FeedItemCard.tsx +++ b/client/components/social/FeedItemCard.tsx @@ -71,7 +71,11 @@ export function FeedItemCard({ if (!content) return; setSubmittingComment(true); try { - const created = await communityService.addComment(item.id, user.id, content); + const created = await communityService.addComment( + item.id, + user.id, + content, + ); if (created) { setComments((prev) => [...prev, created]); setCommentText(""); @@ -219,23 +223,35 @@ export function FeedItemCard({
{loadingComments ? ( -

Loading comments…

+

+ Loading comments… +

) : comments.length === 0 ? ( -

Be the first to comment.

+

+ Be the first to comment. +

) : ( comments.map((c) => (
- + - {(c.user_profiles?.full_name || c.user_profiles?.username || "U")[0]?.toUpperCase() || "U"} + {(c.user_profiles?.full_name || + c.user_profiles?.username || + "U")[0]?.toUpperCase() || "U"}
- {c.user_profiles?.full_name || c.user_profiles?.username || "Member"} + {c.user_profiles?.full_name || + c.user_profiles?.username || + "Member"} +
+
+ {c.content}
-
{c.content}
)) @@ -248,7 +264,10 @@ export function FeedItemCard({ onChange={(e) => setCommentText(e.target.value)} className="min-h-[44px]" /> -
diff --git a/client/components/social/PostComposer.tsx b/client/components/social/PostComposer.tsx index baf5290d..73ec38d0 100644 --- a/client/components/social/PostComposer.tsx +++ b/client/components/social/PostComposer.tsx @@ -112,10 +112,18 @@ export default function PostComposer({ ? "New photo" : "Update"); - const inlineTags = Array.from((text.match(/#[\p{L}0-9_]+/gu) || []).map((t) => t.replace(/^#/, "").toLowerCase())); + const inlineTags = Array.from( + (text.match(/#[\p{L}0-9_]+/gu) || []).map((t) => + t.replace(/^#/, "").toLowerCase(), + ), + ); const baseTags = mediaType === "none" ? ["update"] : [mediaType, "feed"]; const combinedTags = Array.from( - new Set([...baseTags, ...selectedTags.map((t) => t.toLowerCase()), ...inlineTags]).values(), + new Set([ + ...baseTags, + ...selectedTags.map((t) => t.toLowerCase()), + ...inlineTags, + ]).values(), ); await communityService.createPost({ diff --git a/client/pages/Feed.tsx b/client/pages/Feed.tsx index 2982c6ca..158f32fc 100644 --- a/client/pages/Feed.tsx +++ b/client/pages/Feed.tsx @@ -245,7 +245,9 @@ export default function Feed() { const handleComment = useCallback((postId: string) => { setItems((prev) => - prev.map((it) => (it.id === postId ? { ...it, comments: it.comments + 1 } : it)), + prev.map((it) => + it.id === postId ? { ...it, comments: it.comments + 1 } : it, + ), ); }, []); @@ -452,7 +454,9 @@ export default function Feed() {
fetchFeed()} - suggestedTags={trendingTopics.map((t) => t.topic.replace(/^#/, "")).slice(0, 8)} + suggestedTags={trendingTopics + .map((t) => t.topic.replace(/^#/, "")) + .slice(0, 8)} />
diff --git a/client/pages/Staff.tsx b/client/pages/Staff.tsx index dd8f7bad..cdb09c5a 100644 --- a/client/pages/Staff.tsx +++ b/client/pages/Staff.tsx @@ -336,16 +336,23 @@ export default function Staff() {
{users.length === 0 ? ( -

No users found.

+

+ No users found. +

) : (
{users.map((u) => ( -
+
{u.full_name || u.username || u.id}
-
{u.username}
+
+ {u.username} +
{u.user_type || "unknown"} diff --git a/server/index.ts b/server/index.ts index 9c330f35..a96fa22d 100644 --- a/server/index.ts +++ b/server/index.ts @@ -1183,11 +1183,15 @@ export function createServer() { // Staff: users search/listing app.get("/api/staff/users", async (req, res) => { const limit = Math.max(1, Math.min(50, Number(req.query.limit) || 20)); - const q = String(req.query.q || "").trim().toLowerCase(); + const q = String(req.query.q || "") + .trim() + .toLowerCase(); try { const { data, error } = await adminSupabase .from("user_profiles") - .select("id, username, full_name, avatar_url, user_type, created_at, updated_at") + .select( + "id, username, full_name, avatar_url, user_type, created_at, updated_at", + ) .order("created_at", { ascending: false }) .limit(limit); if (error) return res.status(500).json({ error: error.message });