36 lines
997 B
TypeScript
36 lines
997 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.
|
|
*
|
|
* Cards link into /u/[handle]/collections/[id] — the same grid → carousel
|
|
* detail structure the auth user gets at /u/me/collections.
|
|
*/
|
|
|
|
import { CollectionViews } from "@/components/social/collection/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) => `/u/${data.handle}/collections/${c.id}`}
|
|
/>
|
|
);
|
|
}
|