run codemod on every file
This commit is contained in:
@@ -12,8 +12,7 @@ import {
|
||||
import Svg, {Circle, Path, Rect} from 'react-native-svg'
|
||||
import {Image as ExpoImage} from 'expo-image'
|
||||
import {type ModerationUI} from '@atproto/api'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useLingui} from '@lingui/react/macro'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
import {useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
@@ -361,7 +360,7 @@ let EditableUserAvatar = ({
|
||||
onSelectNewAvatar,
|
||||
}: EditableUserAvatarProps): React.ReactNode => {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
const {requestCameraAccessIfNeeded} = useCameraPermission()
|
||||
const {requestPhotoAccessIfNeeded} = usePhotoLibraryPermission()
|
||||
const [rawImage, setRawImage] = useState<ComposerImage | undefined>()
|
||||
@@ -461,7 +460,7 @@ let EditableUserAvatar = ({
|
||||
return (
|
||||
<>
|
||||
<Menu.Root>
|
||||
<Menu.Trigger label={_(msg`Edit avatar`)}>
|
||||
<Menu.Trigger label={l`Edit avatar`}>
|
||||
{({props}) => (
|
||||
<Pressable {...props} testID="changeAvatarBtn">
|
||||
{avatar ? (
|
||||
@@ -491,7 +490,7 @@ let EditableUserAvatar = ({
|
||||
{IS_NATIVE && (
|
||||
<Menu.Item
|
||||
testID="changeAvatarCameraBtn"
|
||||
label={_(msg`Upload from Camera`)}
|
||||
label={l`Upload from Camera`}
|
||||
onPress={onOpenCamera}>
|
||||
<Menu.ItemText>
|
||||
<Trans>Upload from Camera</Trans>
|
||||
@@ -502,7 +501,7 @@ let EditableUserAvatar = ({
|
||||
|
||||
<Menu.Item
|
||||
testID="changeAvatarLibraryBtn"
|
||||
label={_(msg`Upload from Library`)}
|
||||
label={l`Upload from Library`}
|
||||
onPress={onOpenLibrary}>
|
||||
<Menu.ItemText>
|
||||
{IS_NATIVE ? (
|
||||
@@ -520,7 +519,7 @@ let EditableUserAvatar = ({
|
||||
<Menu.Group>
|
||||
<Menu.Item
|
||||
testID="changeAvatarRemoveBtn"
|
||||
label={_(msg`Remove Avatar`)}
|
||||
label={l`Remove Avatar`}
|
||||
onPress={onRemoveAvatar}>
|
||||
<Menu.ItemText>
|
||||
<Trans>Remove Avatar</Trans>
|
||||
@@ -532,7 +531,6 @@ let EditableUserAvatar = ({
|
||||
)}
|
||||
</Menu.Outer>
|
||||
</Menu.Root>
|
||||
|
||||
<EditImageDialog
|
||||
control={editImageDialogControl}
|
||||
image={rawImage}
|
||||
@@ -556,7 +554,7 @@ let PreviewableUserAvatar = ({
|
||||
...props
|
||||
}: PreviewableUserAvatarProps): React.ReactNode => {
|
||||
const ax = useAnalytics()
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
const queryClient = useQueryClient()
|
||||
const status = useActorStatus(profile)
|
||||
const liveControl = useDialogControl()
|
||||
@@ -595,12 +593,10 @@ let PreviewableUserAvatar = ({
|
||||
) : status.isActive && (IS_NATIVE || IS_WEB_TOUCH_DEVICE) ? (
|
||||
<>
|
||||
<Button
|
||||
label={_(
|
||||
msg`${sanitizeDisplayName(
|
||||
profile.displayName || sanitizeHandle(profile.handle),
|
||||
)}'s avatar`,
|
||||
)}
|
||||
accessibilityHint={_(msg`Opens live status dialog`)}
|
||||
label={l`${sanitizeDisplayName(
|
||||
profile.displayName || sanitizeHandle(profile.handle),
|
||||
)}'s avatar`}
|
||||
accessibilityHint={l`Opens live status dialog`}
|
||||
onPress={onOpenLiveStatus}>
|
||||
{avatarEl}
|
||||
</Button>
|
||||
@@ -613,12 +609,10 @@ let PreviewableUserAvatar = ({
|
||||
</>
|
||||
) : (
|
||||
<Link
|
||||
label={_(
|
||||
msg`${sanitizeDisplayName(
|
||||
profile.displayName || sanitizeHandle(profile.handle),
|
||||
)}'s avatar`,
|
||||
)}
|
||||
accessibilityHint={_(msg`Opens this profile`)}
|
||||
label={l`${sanitizeDisplayName(
|
||||
profile.displayName || sanitizeHandle(profile.handle),
|
||||
)}'s avatar`}
|
||||
accessibilityHint={l`Opens this profile`}
|
||||
to={makeProfileLink({
|
||||
did: profile.did,
|
||||
handle: profile.handle,
|
||||
|
||||
Reference in New Issue
Block a user