diff --git a/src/components/StarterPack/NewskieDialog.tsx b/src/components/StarterPack/NewskieDialog.tsx new file mode 100644 index 0000000000..92919111a7 --- /dev/null +++ b/src/components/StarterPack/NewskieDialog.tsx @@ -0,0 +1,65 @@ +import React from 'react' +import {Pressable, View} from 'react-native' +import {AppBskyActorDefs, AppBskyGraphStarterpack} from '@atproto/api' +import {msg, Trans} from '@lingui/macro' +import {useLingui} from '@lingui/react' + +import {HITSLOP_10} from 'lib/constants' +import {isNative} from 'platform/detection' +import {atoms as a} from '#/alf' +import * as Dialog from '#/components/Dialog' +import {useDialogControl} from '#/components/Dialog' +import {Newskie} from '#/components/icons/Newskie' +import {Text} from '#/components/Typography' + +export function NewskieDialog({ + profile, +}: { + profile: AppBskyActorDefs.ProfileViewDetailed +}) { + const {_} = useLingui() + const control = useDialogControl() + + const profileName = profile.displayName || `@${profile.handle}` + const joinedVia = profile.joinedViaStarterPack + + return ( + <> + + + + + + + + + + {profileName} is new here! + + + {AppBskyGraphStarterpack.isRecord(joinedVia?.record) ? ( + + {profileName} recently joined Bluesky with{' '} + {joinedVia?.creator.displayName || + `@${joinedVia?.creator.handle}`} + 's starter pack! + + ) : ( + + {profileName} recently joined Bluesky on {profile.createdAt}. + + )} + + + + + + ) +} diff --git a/src/components/icons/Newskie.tsx b/src/components/icons/Newskie.tsx index 881255736c..ba4943f1be 100644 --- a/src/components/icons/Newskie.tsx +++ b/src/components/icons/Newskie.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native' import Svg, {Path} from 'react-native-svg' export function Newskie({size}: {size: number}) { return ( - + + @@ -26,6 +27,9 @@ export function ProfileHeaderDisplayName({ moderation.ui('displayName'), )} + + + ) }