a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

turned hardcode into hawt code

celine 9220555b 1c792469

+6 -19
+6 -19
app/home/Publications.tsx
··· 9 9 10 10 export const MyPublicationList = () => { 11 11 let { identity } = useIdentityData(); 12 - // if (!identity || !identity.atp_did) return <PubListEmpty />; 12 + if (!identity || !identity.atp_did) return <PubListEmpty />; 13 13 return ( 14 14 <div className="pubList w-full sm:w-[200px] flex flex-col gap-1 sm:gap-2 container p-2 sm:p-0 sm:bg-transparent sm:border-0 "> 15 15 <div className="flex justify-between items-center font-bold text-tertiary text-sm"> ··· 21 21 <AddTiny /> 22 22 </Link> 23 23 </div> 24 - <PublicationList /> 24 + <PublicationList publications={identity.publications} /> 25 25 </div> 26 26 ); 27 27 }; 28 28 29 29 const PublicationList = (props: { 30 - publications?: { 30 + publications: { 31 31 identity_did: string; 32 32 indexed_at: string; 33 33 name: string; ··· 38 38 39 39 return ( 40 40 <div className="pubList w-full flex flex-row sm:flex-col gap-3 sm:gap-2"> 41 - <HardcodePublication name="Leaflet Explorers" /> 42 - <HardcodePublication name="Leaflet Explorers" /> 43 - 44 - {/* {props.publications?.map((d) => ( 41 + {props.publications?.map((d) => ( 45 42 <Publication 46 43 {...d} 47 44 key={d.uri} 48 45 handle={identity?.resolved_did?.alsoKnownAs?.[0].slice(5)!} 49 46 /> 50 - ))} */} 47 + ))} 51 48 </div> 52 49 ); 53 50 }; 54 - function HardcodePublication(props: { name: string }) { 55 - return ( 56 - <Link 57 - className="pubListItem w-full p-3 opaque-container rounded-lg! text-secondary text-center hover:no-underline flex flex-col gap-1 place-items-center transparent-outline outline-2 outline-offset-1 hover:outline-border basis-0 grow min-w-0" 58 - href={`/`} 59 - > 60 - <div className="w-6 h-6 rounded-full bg-test" /> 61 - <h4 className="font-bold w-full truncate">{props.name}</h4> 62 - </Link> 63 - ); 64 - } 51 + 65 52 function Publication(props: { uri: string; name: string; handle: string }) { 66 53 return ( 67 54 <Link