Remove unused file

This commit is contained in:
Eric Bailey
2024-06-18 12:08:26 -05:00
parent 3beaa7f39a
commit 08fa02302f
@@ -1,76 +0,0 @@
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 {useGetTimeAgo} from '#/lib/hooks/useTimeAgo'
import {HITSLOP_10} from 'lib/constants'
import {isNative} from 'platform/detection'
import {useSession} from 'state/session'
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 {currentAccount} = useSession()
const control = useDialogControl()
const {joinedViaStarterPack} = profile
const profileName = profile.displayName || `@${profile.handle}`
const timeAgo = useGetTimeAgo()
if (!profile.createdAt) return null
return (
<>
<Pressable
accessibilityRole="button"
accessibilityLabel={_(msg`Open new user info dialog`)}
accessibilityHint={_(
msg`Opens a dialog with information about the new user`,
)}
hitSlop={HITSLOP_10}
onPress={control.open}>
<Newskie size={22} />
</Pressable>
<Dialog.Outer control={control}>
<Dialog.Handle />
<Dialog.ScrollableInner label={_(msg`New user info dialog`)}>
<View style={[a.gap_md, isNative && {marginBottom: 40}]}>
<Text style={[a.font_bold, a.text_xl]}>
<Trans>Say hello!</Trans>
</Text>
<Text style={[a.text_md]}>
{AppBskyGraphStarterpack.isRecord(
joinedViaStarterPack?.record,
) ? (
<Trans>
{profileName} joined Bluesky{' '}
{timeAgo(profile.createdAt, {format: 'long'})} ago with{' '}
{joinedViaStarterPack?.creator.did === currentAccount?.did
? 'your'
: `${joinedViaStarterPack?.creator.displayName}'s` ||
`@${joinedViaStarterPack?.creator.handle}'s`}{' '}
starter pack.
</Trans>
) : (
<Trans>
{profileName} recently joined Bluesky{' '}
{timeAgo(profile.createdAt)} ago
</Trans>
)}
</Text>
</View>
</Dialog.ScrollableInner>
</Dialog.Outer>
</>
)
}