mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 06:15:39 -04:00
- Delete carousel.tsx and replace all Carousel/CarouselContent/CarouselItem usage across title rows, cast carousel, continue watching, and explore sections with ScrollArea + scrollFade horizontal scroll - Update ScrollArea to accept a `scrollFade` prop that renders a gradient edge overlay instead of the old per-site absolute div hack - Remove "use client" directive from title-row and cast-carousel now that they have no client-side hooks - Delete unused resizable.tsx; inline TypeBadge icon into TitleHero and delete the standalone type-badge.tsx file - Add TitleTheme component for per-title accent color CSS injection - Swap IconSparkles → IconThumbUp in recommendations section and grid - Simplify ambient glow to a single size (remove mobile breakpoint override)
33 lines
936 B
TypeScript
33 lines
936 B
TypeScript
import { IconThumbUp } from "@tabler/icons-react";
|
|
import { getRecommendationsFeed } from "@/lib/services/discovery";
|
|
import { tmdbImageUrl } from "@/lib/tmdb/image";
|
|
import { FeedSection } from "./feed-section";
|
|
import { TitleGrid } from "./title-grid";
|
|
|
|
export async function RecommendationsSection({ userId }: { userId: string }) {
|
|
const feed = await getRecommendationsFeed(userId);
|
|
if (feed.length === 0) return null;
|
|
|
|
const items = feed
|
|
.filter((item) => !!item)
|
|
.slice(0, 10)
|
|
.map((t) => ({
|
|
id: t.id,
|
|
tmdbId: t.tmdbId,
|
|
type: t.type,
|
|
title: t.title,
|
|
posterPath: tmdbImageUrl(t.posterPath, "w500"),
|
|
releaseDate: t.releaseDate ?? t.firstAirDate,
|
|
voteAverage: t.voteAverage,
|
|
}));
|
|
|
|
return (
|
|
<FeedSection
|
|
title="Recommended for You"
|
|
icon={<IconThumbUp className="size-5 text-primary" />}
|
|
>
|
|
<TitleGrid items={items} />
|
|
</FeedSection>
|
|
);
|
|
}
|