import { View, Text, Pressable } from "react-native"; import { Link } from "expo-router"; import { useTheme } from "./theme"; import { Badge } from "./ui/badge"; import { getCategoryName } from "../lib/constants"; interface PostCardProps { post: { _id: string; title: string; description: string; category?: string; location?: string; budget?: string; status: string; createdAt: number; }; } export function PostCard({ post }: PostCardProps) { const theme = useTheme(); const categoryName = post.category ? getCategoryName(post.category) : null; const isOpen = post.status === "open"; return ( {post.title} {post.description} {categoryName && } {post.location && ( 📍 {post.location} )} {post.budget && ( 💰 {post.budget} )} ); }