Unify person page for local and TMDB people
- Merge local and TMDB person views into a single PersonDetailsPage - Remove unused PersonTmdbRedirectPage - Show age tooltip on birthdays (person page and people list)
This commit is contained in:
1 parent
6d4c3e185a
commit
f88dfdae44
4 files changed
+183
-517
No files matched your search
@@ -8,8 +8,13 @@ import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { Switch } from "@/components/ui/switch";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { Search, Heart } from "lucide-react";
|
||||
import { getProfileUrl } from "@/lib/media-utils";
|
||||
import { getProfileUrl, formatDate, calculateAge } from "@/lib/media-utils";
|
||||
|
||||
type PeopleFilter = "all" | "favorite";
|
||||
|
||||
@@ -207,6 +212,18 @@ export function PeoplePage() {
|
||||
<p className="text-sm font-medium line-clamp-2">
|
||||
{person.name}
|
||||
</p>
|
||||
{person.birthday && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger render={<span />}>
|
||||
<span className="text-xs text-muted-foreground">
|
||||
Born: {formatDate(person.birthday)}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
Age: {calculateAge(person.birthday, person.deathday)}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
</Link>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user