{title}
+{body}
+ {km != null && {km} km} +diff --git a/src/components/Posts/PostCard.jsx b/src/components/Posts/PostCard.jsx
new file mode 100644
index 0000000..52ca087
--- /dev/null
+++ b/src/components/Posts/PostCard.jsx
@@ -0,0 +1,39 @@
+import React from "react";
+
+function getKmFromPost(post) {
+ return (
+ post.km ??
+ post.distance_km ??
+ post.distanceKm ??
+ post.dist_km ??
+ null
+ );
+}
+
+export default function PostCard({ post, selected, onSelect }) {
+ const title = post.title || post.name || "Post";
+
+ const fullBody =
+ post.body || post.content || post.text || "";
+
+ // texte court dans le Sociowall
+ const body =
+ fullBody.length > 80 ? fullBody.slice(0, 77) + "..." : fullBody;
+
+ const km = getKmFromPost(post);
+
+ function handleClick() {
+ if (onSelect) onSelect(post);
+ }
+
+ return (
+ {body}{title}
+
Chargement...
} + {error &&{error}
} + + {filtered.map((p) => ( +Aucun post dans ce rayon.
+ )} +