import { format } from "date-fns"; import { Link } from "react-router-dom"; import type { EntrySeen, EpisodeSeen } from "@/types"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Pencil, Trash2, Users } from "lucide-react"; interface EpisodeWatchHistoryProps { watchHistory: (EntrySeen | EpisodeSeen)[]; onEdit?: (id: number) => void; onDelete?: (id: number) => void; } export function EpisodeWatchHistory({ watchHistory, onEdit, onDelete, }: EpisodeWatchHistoryProps) { if (watchHistory.length === 0) { return (
No watch history yet.
); } return (| Date |
|
Actions |
|---|---|---|
| {record.date_seen ? format(new Date(record.date_seen), "MMM d, yyyy") : "-"} |
{record.buddies && record.buddies.length > 0 ? (
record.buddies.map((b) => (
|
{onEdit && (
)}
{onDelete && (
)}
|