import React from 'react'; import { Bookmark, Heart, MessageCircle, MoreHorizontal, Send } from 'lucide-react'; import { Post } from '../types'; import { formatDateSafe } from '../lib/utils'; import { MediaCarousel } from './MediaCarousel'; interface FeedPostProps { post: Post; profilePic: string | null; /** Off-screen posts keep their video paused. */ paused: boolean; } /** * One post in the mobile feed, laid out like Instagram's: header, media, * action row, then caption. * * Media is capped below full viewport height so the next post always peeks in * at the bottom — that overlap is what tells you the page scrolls rather than * pages. */ export const FeedPost: React.FC = ({ post, profilePic, paused }) => (
{profilePic ? : {post.username[0]}}
{post.username}
{/* Taller ceiling than the modal so ordinary portrait media (9:16 reels, 4:5 photos) fills the feed width instead of sitting in side bars, while still stopping anything extreme from swallowing the screen. */}
{post.caption && (
{post.username} {post.caption}
)}
{formatDateSafe(post.date, 'MMMM d, yyyy')}
);