From 37b53ae95ab8f79f64f5b3876eaad4491b58af90 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 24 Jun 2024 17:17:23 -0500 Subject: [PATCH] Break up new profile card for easier re-use --- src/components/ProfileCard.tsx | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/components/ProfileCard.tsx b/src/components/ProfileCard.tsx index a0d222854b..73bde261a9 100644 --- a/src/components/ProfileCard.tsx +++ b/src/components/ProfileCard.tsx @@ -10,10 +10,30 @@ import {FollowButton} from 'view/com/profile/FollowButton' import {ProfileCardPills} from 'view/com/profile/ProfileCard' import {UserAvatar} from 'view/com/util/UserAvatar' import {atoms as a, useTheme} from '#/alf' -import {Link} from '#/components/Link' +import {Link as InternalLink, LinkProps} from '#/components/Link' import {Text} from '#/components/Typography' export function Default({ + profile, + moderationOpts, + logContext = 'ProfileCard', +}: { + profile: AppBskyActorDefs.ProfileViewDetailed + moderationOpts: ModerationOpts + logContext?: 'ProfileCard' | 'StarterPackProfilesList' +}) { + return ( + + + + ) +} + +export function Card({ profile: profileUnshadowed, moderationOpts, logContext = 'ProfileCard', @@ -31,7 +51,7 @@ export function Default({ const moderation = moderateProfile(profile, moderationOpts) return ( - + )} - + ) } -function Wrapper({did, children}: {did: string; children: React.ReactNode}) { +export function Link({did, children}: {did: string} & Omit) { return ( - - {children} - + {children} + ) }