Files
2026-06-02 01:57:08 +05:30

28 lines
790 B
TypeScript

"use client";
/**
* /u/[handle]/collections — public collections for a profile.
*
* The list comes from the layout's profile fetch (`public_collections`),
* so this page only has to decide between the empty state and the grid.
* Layout owns the ProfileHeader + tabs + container.
*/
import { CollectionViews } from "@/components/social/collection-views";
import { usePublicProfile } from "../profile-context";
export default function PublicProfileCollectionsPage() {
const data = usePublicProfile();
const list = data.public_collections ?? [];
if (list.length === 0) {
return (
<p className="text-sm text-muted-foreground">
No public collections yet.
</p>
);
}
return <CollectionViews collections={list} hrefFor={(c) => `/c/${c.id}`} />;
}