Files
sofa/app/(pages)/dashboard/_components/library-section.tsx
T
jakeandClaude Opus 4.6 7d69262d0e Polish settings UI, add tooltips, replace timeAgo with date-fns
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>
2026-03-03 20:23:52 -05:00

30 lines
869 B
TypeScript

import { IconSparkles } from "@tabler/icons-react";
import { getNewAvailableFeed } from "@/lib/services/discovery";
import { tmdbImageUrl } from "@/lib/tmdb/image";
import { FeedSection } from "./feed-section";
import { TitleGrid } from "./title-grid";
export async function LibrarySection({ userId }: { userId: string }) {
const feed = await getNewAvailableFeed(userId);
if (feed.length === 0) return null;
const items = feed.slice(0, 10).map((t) => ({
id: t.titleId,
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="In Your Library"
icon={<IconSparkles className="size-5 text-primary" />}
>
<TitleGrid items={items} />
</FeedSection>
);
}