mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 07:25:38 -04:00
Add watch status indicators to title cards on Explore page
Title cards now show the user's existing watch status (watchlist, watching, completed) with a color-coded badge on the poster and a status-aware quick-add button that prevents re-adding tracked titles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ interface TitleRowProps {
|
||||
heading: string;
|
||||
icon: React.ReactNode;
|
||||
items: TitleRowItem[];
|
||||
userStatuses?: Record<string, "watchlist" | "in_progress" | "completed">;
|
||||
}
|
||||
|
||||
const staggerContainer = {
|
||||
@@ -39,7 +40,12 @@ const staggerItem = {
|
||||
},
|
||||
};
|
||||
|
||||
export function TitleRow({ heading, icon, items }: TitleRowProps) {
|
||||
export function TitleRow({
|
||||
heading,
|
||||
icon,
|
||||
items,
|
||||
userStatuses,
|
||||
}: TitleRowProps) {
|
||||
if (items.length === 0) return null;
|
||||
|
||||
return (
|
||||
@@ -74,6 +80,7 @@ export function TitleRow({ heading, icon, items }: TitleRowProps) {
|
||||
voteAverage={item.voteAverage}
|
||||
href={`/titles/tmdb-${item.tmdbId}-${item.type}`}
|
||||
showQuickAdd
|
||||
userStatus={userStatuses?.[`${item.tmdbId}-${item.type}`]}
|
||||
/>
|
||||
</motion.div>
|
||||
</CarouselItem>
|
||||
|
||||
Reference in New Issue
Block a user