mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
Clean up settings section design: consolidate backup cards, add hover-reveal actions with tooltips, improve icon sizing across components, and replace custom timeAgo helper with date-fns formatDistanceToNow in webhook card. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
938 B
TypeScript
33 lines
938 B
TypeScript
import { IconSparkles } 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={<IconSparkles className="size-5 text-primary" />}
|
|
>
|
|
<TitleGrid items={items} />
|
|
</FeedSection>
|
|
);
|
|
}
|