Skip to content

Commit

Permalink
Add AnyCoreProfileView, need to discuss
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey committed Jan 7, 2025
1 parent b9a21f2 commit 1de44ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/types/atproto/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ export type AnyProfileView =
| AppBskyActorDefs.ProfileViewDetailed
| ChatBskyActorDefs.ProfileViewBasic

/**
* Matches `app.bsky.*` profile view exported by our SDK
*/
export type AnyCoreProfileView =
| AppBskyActorDefs.ProfileViewBasic
| AppBskyActorDefs.ProfileView
| AppBskyActorDefs.ProfileViewDetailed

/**
* Maps any profile view type to `ProfileViewBasic`.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/view/com/profile/ProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export function ProfileCard({
showKnownFollowers,
}: {
testID?: string
profile: atp.profile.AnyProfileView
profile: atp.profile.AnyCoreProfileView
noModFilter?: boolean
noBg?: boolean
noBorder?: boolean
renderButton?: (
profile: Shadow<atp.profile.AnyProfileView>,
profile: Shadow<atp.profile.AnyCoreProfileView>,
) => React.ReactNode
onPress?: () => void
style?: StyleProp<ViewStyle>
Expand Down

0 comments on commit 1de44ec

Please sign in to comment.