From f04932140a77881ec64870f87d9b5ffffb22e784 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Fri, 22 Mar 2024 11:32:49 -0500
Subject: Fix crash during onboarding (#3338)

* Fix crash during onboarding

* Fix other usage
---
 .../Profile/Header/ProfileHeaderLabeler.tsx        | 48 +++++++++++-----------
 1 file changed, 24 insertions(+), 24 deletions(-)

(limited to 'src/screens/Profile/Header/ProfileHeaderLabeler.tsx')

diff --git a/src/screens/Profile/Header/ProfileHeaderLabeler.tsx b/src/screens/Profile/Header/ProfileHeaderLabeler.tsx
index 6722ed09b..a93cda134 100644
--- a/src/screens/Profile/Header/ProfileHeaderLabeler.tsx
+++ b/src/screens/Profile/Header/ProfileHeaderLabeler.tsx
@@ -3,43 +3,42 @@ import {View} from 'react-native'
 import {
   AppBskyActorDefs,
   AppBskyLabelerDefs,
-  ModerationOpts,
   moderateProfile,
+  ModerationOpts,
   RichText as RichTextAPI,
 } from '@atproto/api'
-import {Trans, msg} from '@lingui/macro'
+import {msg, Trans} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 
-import {RichText} from '#/components/RichText'
+import {Haptics} from '#/lib/haptics'
+import {isAppLabeler} from '#/lib/moderation'
+import {pluralize} from '#/lib/strings/helpers'
+import {logger} from '#/logger'
+import {Shadow} from '#/state/cache/types'
 import {useModalControls} from '#/state/modals'
+import {useLabelerSubscriptionMutation} from '#/state/queries/labeler'
+import {useLikeMutation, useUnlikeMutation} from '#/state/queries/like'
 import {usePreferencesQuery} from '#/state/queries/preferences'
-import {useAnalytics} from 'lib/analytics/analytics'
 import {useSession} from '#/state/session'
-import {Shadow} from '#/state/cache/types'
+import {useAnalytics} from 'lib/analytics/analytics'
 import {useProfileShadow} from 'state/cache/profile-shadow'
-import {useLabelerSubscriptionMutation} from '#/state/queries/labeler'
-import {useLikeMutation, useUnlikeMutation} from '#/state/queries/like'
-import {logger} from '#/logger'
-import {Haptics} from '#/lib/haptics'
-import {pluralize} from '#/lib/strings/helpers'
-import {isAppLabeler} from '#/lib/moderation'
-
-import {atoms as a, useTheme, tokens} from '#/alf'
-import {Button, ButtonText} from '#/components/Button'
-import {Text} from '#/components/Typography'
-import * as Toast from '#/view/com/util/Toast'
-import {ProfileHeaderShell} from './Shell'
 import {ProfileMenu} from '#/view/com/profile/ProfileMenu'
-import {ProfileHeaderDisplayName} from './DisplayName'
-import {ProfileHeaderHandle} from './Handle'
-import {ProfileHeaderMetrics} from './Metrics'
+import * as Toast from '#/view/com/util/Toast'
+import {atoms as a, tokens, useTheme} from '#/alf'
+import {Button, ButtonText} from '#/components/Button'
+import {DialogOuterProps} from '#/components/Dialog'
 import {
-  Heart2_Stroke2_Corner0_Rounded as Heart,
   Heart2_Filled_Stroke2_Corner0_Rounded as HeartFilled,
+  Heart2_Stroke2_Corner0_Rounded as Heart,
 } from '#/components/icons/Heart2'
-import {DialogOuterProps} from '#/components/Dialog'
-import * as Prompt from '#/components/Prompt'
 import {Link} from '#/components/Link'
+import * as Prompt from '#/components/Prompt'
+import {RichText} from '#/components/RichText'
+import {Text} from '#/components/Typography'
+import {ProfileHeaderDisplayName} from './DisplayName'
+import {ProfileHeaderHandle} from './Handle'
+import {ProfileHeaderMetrics} from './Metrics'
+import {ProfileHeaderShell} from './Shell'
 
 interface Props {
   profile: AppBskyActorDefs.ProfileViewDetailed
@@ -312,6 +311,7 @@ function CantSubscribePrompt({
 }: {
   control: DialogOuterProps['control']
 }) {
+  const {_} = useLingui()
   return (
     <Prompt.Outer control={control}>
       <Prompt.Title>Unable to subscribe</Prompt.Title>
@@ -322,7 +322,7 @@ function CantSubscribePrompt({
         </Trans>
       </Prompt.Description>
       <Prompt.Actions>
-        <Prompt.Action onPress={control.close}>OK</Prompt.Action>
+        <Prompt.Action onPress={control.close} cta={_(msg`OK`)} />
       </Prompt.Actions>
     </Prompt.Outer>
   )
-- 
cgit 1.4.1

