mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 03:55:38 -04:00
Rename the person detail route from `app/(pages)/person/[id]` to `app/(pages)/people/[id]` and update all internal links accordingly. Strip crew members from the cast carousel so only actors are shown; remove the `crew` prop from `CastCarousel` and `TitleCast` entirely. Move the trailer trigger from the metadata row into a centered overlay on the backdrop image using a new `variant="backdrop"` prop on `TrailerDialog`, replacing the previous inline button approach. Swap several icons for better semantic matches: `IconBooks` for the library section, `IconCheck` for the "Mark Watched" button, `IconSparkles` on the Recommendations heading, and `IconDeviceTvOld` on the Seasons heading. Replace a nested `motion.p` with a plain `<p>` using CSS `transition-opacity` in `StatsDisplay`. Remove the `animate-gentle-float` keyframe and the `feed-scroll` utility from `globals.css`, replacing the latter with the existing `no-scrollbar` class.
30 lines
863 B
TypeScript
30 lines
863 B
TypeScript
import { IconBooks } 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={<IconBooks className="size-5 text-primary" />}
|
|
>
|
|
<TitleGrid items={items} />
|
|
</FeedSection>
|
|
);
|
|
}
|