feat: Add media details sidebar and date handling features, including media grouping by date

This commit is contained in:
2025-11-16 03:32:18 +01:00
parent 94b184d3b0
commit 2003a55ff7
16 changed files with 362 additions and 52 deletions

View File

@@ -0,0 +1,36 @@
import { useGetPerson } from "@/features/people/use-people";
import { Link } from "@tanstack/react-router";
import { Badge } from "@/components/ui/badge";
import { UserSquare } from "lucide-react";
type PersonFaceBadgeProps = {
personId: string | null;
};
export function PersonFaceBadge({ personId }: PersonFaceBadgeProps) {
const { data: person } = useGetPerson(personId ?? "");
const content = (
<Badge
variant="secondary"
className="inline-flex items-center gap-2 text-sm"
>
<UserSquare size={16} />
{person ? person.name : personId ? "Loading..." : "Unknown"}
</Badge>
);
if (!personId || !person) {
return content;
}
return (
<Link
to="/people/$personId"
params={{ personId: person.id }}
className="hover:opacity-80"
>
{content}
</Link>
);
}