diff --git a/app/p/[didOrHandle]/ProfilePageLayout.tsx b/app/p/[didOrHandle]/ProfilePageLayout.tsx --- a/app/p/[didOrHandle]/ProfilePageLayout.tsx +++ b/app/p/[didOrHandle]/ProfilePageLayout.tsx @@ -6,10 +6,14 @@ import { Json } from "supabase/database.types"; import { ProfileViewDetailed } from "@atproto/api/dist/client/types/app/bsky/actor/defs"; import { Avatar } from "components/Avatar"; -import { AppBskyActorProfile } from "lexicons/api"; +import { AppBskyActorProfile, PubLeafletPublication } from "lexicons/api"; import { blobRefToSrc } from "src/utils/blobRefToSrc"; +import { PubIcon } from "components/ActionBar/Publications"; +import { usePubTheme } from "components/ThemeManager/PublicationThemeProvider"; +import { colorToString } from "components/ThemeManager/useColorAttribute"; export const ProfilePageLayout = (props: { + publications: { record: Json; uri: string }[]; profile: { did: string; handle: string | null; @@ -29,7 +33,12 @@ defaultTab="home" tabs={{ home: { - content: , + content: ( + + ), controls: null, }, }} @@ -41,6 +50,7 @@ export type profileTabsType = "posts" | "comments" | "subscriptions"; const ProfilePageContent = (props: { + publications: { record: Json; uri: string }[]; profile: { did: string; handle: string | null; @@ -83,8 +93,13 @@ )}
{profileRecord.description}
-
pub 1
-
pub 2
+ {props.publications.map((p) => ( + + ))}
@@ -94,4 +109,32 @@ const PubListingCompact = () => { return
; +}; + +const PublicationCard = (props: { + record: PubLeafletPublication.Record; + uri: string; +}) => { + const { record, uri } = props; + const { bgLeaflet, bgPage } = usePubTheme(record.theme); + + return ( + +
+ +

{record.name}

+
+
+ ); }; diff --git a/app/p/[didOrHandle]/page.tsx b/app/p/[didOrHandle]/page.tsx --- a/app/p/[didOrHandle]/page.tsx +++ b/app/p/[didOrHandle]/page.tsx @@ -31,6 +31,10 @@ .select(`*`) .eq("did", did) .single(); + let { data: pubs } = await supabaseServerClient + .from("publications") + .select("*") + .eq("identity_did", did); - return ; + return ; }