From 427f3a8bd7f21f14aef32af2f7ccf1f4b2731c29 Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 12 Nov 2024 11:18:53 -0800 Subject: Add email verification prompts throughout the app (#6174) --- src/components/dialogs/VerifyEmailDialog.tsx | 62 ++++++++++++++++++---------- 1 file changed, 41 insertions(+), 21 deletions(-) (limited to 'src/components/dialogs') diff --git a/src/components/dialogs/VerifyEmailDialog.tsx b/src/components/dialogs/VerifyEmailDialog.tsx index 8dfb9bc49..d4412b6f8 100644 --- a/src/components/dialogs/VerifyEmailDialog.tsx +++ b/src/components/dialogs/VerifyEmailDialog.tsx @@ -18,8 +18,14 @@ import {Text} from '#/components/Typography' export function VerifyEmailDialog({ control, + onCloseWithoutVerifying, + onCloseAfterVerifying, + reasonText, }: { control: Dialog.DialogControlProps + onCloseWithoutVerifying?: () => void + onCloseAfterVerifying?: () => void + reasonText?: string }) { const agent = useAgent() @@ -30,18 +36,24 @@ export function VerifyEmailDialog({ control={control} onClose={async () => { if (!didVerify) { + onCloseWithoutVerifying?.() return } try { await agent.resumeSession(agent.session!) + onCloseAfterVerifying?.() } catch (e: unknown) { logger.error(String(e)) return } }}> - + ) } @@ -49,9 +61,11 @@ export function VerifyEmailDialog({ export function Inner({ control, setDidVerify, + reasonText, }: { control: Dialog.DialogControlProps setDidVerify: (value: boolean) => void + reasonText?: string }) { const {_} = useLingui() const {currentAccount} = useSession() @@ -135,26 +149,32 @@ export function Inner({ {currentStep === 'StepOne' ? ( <> - - You'll receive an email at{' '} - - {currentAccount?.email} - {' '} - to verify it's you. - {' '} - { - e.preventDefault() - control.close(() => { - openModal({name: 'change-email'}) - }) - return false - }}> - Need to change it? - + {!reasonText ? ( + <> + + You'll receive an email at{' '} + + {currentAccount?.email} + {' '} + to verify it's you. + {' '} + { + e.preventDefault() + control.close(() => { + openModal({name: 'change-email'}) + }) + return false + }}> + Need to change it? + + + ) : ( + reasonText + )} ) : ( uiStrings[currentStep].message -- cgit 1.4.1 From c0fb5245f1201ac424f6fb2f789510f94fa6d2fc Mon Sep 17 00:00:00 2001 From: Hailey Date: Fri, 15 Nov 2024 17:32:28 -0800 Subject: Tweak email verification dialog (#6397) --- src/components/dialogs/VerifyEmailDialog.tsx | 67 +++++++++++++++++++--------- src/lib/hooks/useEmail.ts | 16 ++++++- 2 files changed, 59 insertions(+), 24 deletions(-) (limited to 'src/components/dialogs') diff --git a/src/components/dialogs/VerifyEmailDialog.tsx b/src/components/dialogs/VerifyEmailDialog.tsx index d4412b6f8..ced9171ce 100644 --- a/src/components/dialogs/VerifyEmailDialog.tsx +++ b/src/components/dialogs/VerifyEmailDialog.tsx @@ -146,18 +146,17 @@ export function Inner({ ) : null} - - {currentStep === 'StepOne' ? ( - <> - {!reasonText ? ( - <> - - You'll receive an email at{' '} - - {currentAccount?.email} - {' '} - to verify it's you. - {' '} + {currentStep === 'StepOne' ? ( + + {reasonText ? ( + + {reasonText} + + Don't have access to{' '} + + {currentAccount?.email} + + ?{' '} - Need to change it? + Change your email address - - ) : ( - reasonText - )} - - ) : ( - uiStrings[currentStep].message - )} - + . + + + ) : ( + + + You'll receive an email at{' '} + + {currentAccount?.email} + {' '} + to verify it's you. + {' '} + { + e.preventDefault() + control.close(() => { + openModal({name: 'change-email'}) + }) + return false + }}> + Need to change it? + + + )} + + ) : ( + + {uiStrings[currentStep].message} + + )} {currentStep === 'StepTwo' ? ( diff --git a/src/lib/hooks/useEmail.ts b/src/lib/hooks/useEmail.ts index 6e52846d1..ab87f057e 100644 --- a/src/lib/hooks/useEmail.ts +++ b/src/lib/hooks/useEmail.ts @@ -1,4 +1,5 @@ import {useServiceConfigQuery} from '#/state/queries/email-verification-required' +import {useProfileQuery} from '#/state/queries/profile' import {useSession} from '#/state/session' import {BSKY_SERVICE} from '../constants' import {getHostnameFromUrl} from '../strings/url-helpers' @@ -7,13 +8,24 @@ export function useEmail() { const {currentAccount} = useSession() const {data: serviceConfig} = useServiceConfigQuery() + const {data: profile} = useProfileQuery({did: currentAccount?.did}) + + const checkEmailConfirmed = !!serviceConfig?.checkEmailConfirmed + + const isNewEnough = + !!profile?.createdAt && + Date.parse(profile.createdAt) >= Date.parse('2024-11-16T02:00:00.000Z') const isSelfHost = - serviceConfig?.checkEmailConfirmed && currentAccount && getHostnameFromUrl(currentAccount.service) !== getHostnameFromUrl(BSKY_SERVICE) - const needsEmailVerification = !isSelfHost && !currentAccount?.emailConfirmed + + const needsEmailVerification = + !isSelfHost && + checkEmailConfirmed && + !!currentAccount?.emailConfirmed && + isNewEnough return {needsEmailVerification} } -- cgit 1.4.1 From edaf230612f688512c71a66a99742e558620ebd3 Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 16 Nov 2024 21:39:47 +0000 Subject: Remove typography NUX and consistently call upsertProfile (#6424) * Make profile upsert unconditional * Remove Typography NUX * Early exit NUXes on unknown creation date * Clarify via comment --- src/components/dialogs/nuxs/NeueTypography.tsx | 117 ------------------------- src/components/dialogs/nuxs/index.tsx | 26 +++--- src/screens/Onboarding/StepFinished.tsx | 41 +++++---- 3 files changed, 33 insertions(+), 151 deletions(-) delete mode 100644 src/components/dialogs/nuxs/NeueTypography.tsx (limited to 'src/components/dialogs') diff --git a/src/components/dialogs/nuxs/NeueTypography.tsx b/src/components/dialogs/nuxs/NeueTypography.tsx deleted file mode 100644 index f29dc356d..000000000 --- a/src/components/dialogs/nuxs/NeueTypography.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import React from 'react' -import {View} from 'react-native' -import {msg, Trans} from '@lingui/macro' -import {useLingui} from '@lingui/react' - -import {AppearanceToggleButtonGroup} from '#/screens/Settings/AppearanceSettings' -import {atoms as a, useAlf, useTheme} from '#/alf' -import * as Dialog from '#/components/Dialog' -import {useNuxDialogContext} from '#/components/dialogs/nuxs' -import {Divider} from '#/components/Divider' -import {TextSize_Stroke2_Corner0_Rounded as TextSize} from '#/components/icons/TextSize' -import {TitleCase_Stroke2_Corner0_Rounded as Aa} from '#/components/icons/TitleCase' -import {Text} from '#/components/Typography' - -export function NeueTypography() { - const t = useTheme() - const {_} = useLingui() - const nuxDialogs = useNuxDialogContext() - const control = Dialog.useDialogControl() - const {fonts} = useAlf() - - Dialog.useAutoOpen(control, 3e3) - - const onClose = React.useCallback(() => { - nuxDialogs.dismissActiveNux() - }, [nuxDialogs]) - - const onChangeFontFamily = React.useCallback( - (values: string[]) => { - const next = values[0] === 'system' ? 'system' : 'theme' - fonts.setFontFamily(next) - }, - [fonts], - ) - - const onChangeFontScale = React.useCallback( - (values: string[]) => { - const next = values[0] || ('0' as any) - fonts.setFontScale(next) - }, - [fonts], - ) - - return ( - - - - - - - New font settings ✨ - - - - We're introducing a new theme font, along with adjustable font - sizing. - - - - - You can adjust these in your Appearance Settings later. - - - - - - - - - - - - - - - - - ) -} diff --git a/src/components/dialogs/nuxs/index.tsx b/src/components/dialogs/nuxs/index.tsx index d17615aeb..701ae84e6 100644 --- a/src/components/dialogs/nuxs/index.tsx +++ b/src/components/dialogs/nuxs/index.tsx @@ -19,7 +19,6 @@ import {useOnboardingState} from '#/state/shell' /* * NUXs */ -import {NeueTypography} from '#/components/dialogs/nuxs/NeueTypography' import {isSnoozed, snooze, unsnooze} from '#/components/dialogs/nuxs/snoozing' import {IS_DEV} from '#/env' @@ -36,19 +35,7 @@ const queuedNuxs: { currentProfile: AppBskyActorDefs.ProfileViewDetailed preferences: UsePreferencesQueryResponse }) => boolean -}[] = [ - { - id: Nux.NeueTypography, - enabled(props) { - if (props.currentProfile.createdAt) { - if (new Date(props.currentProfile.createdAt) < new Date('2024-10-09')) { - return true - } - } - return false - }, - }, -] +}[] = [] const Context = React.createContext({ activeNux: undefined, @@ -66,7 +53,14 @@ export function NuxDialogs() { const onboardingActive = useOnboardingState().isActive const isLoading = - !currentAccount || !preferences || !profile || onboardingActive + onboardingActive || + !currentAccount || + !preferences || + !profile || + // Profile isn't legit ready until createdAt is a real date. + !profile.createdAt || + profile.createdAt === '0001-01-01T00:00:00.000Z' // TODO: Fix this in AppView. + return !isLoading ? ( - {activeNux === Nux.NeueTypography && } + {/*For example, activeNux === Nux.NeueTypography && */} ) } diff --git a/src/screens/Onboarding/StepFinished.tsx b/src/screens/Onboarding/StepFinished.tsx index fdc0a3eb7..0d8971b6f 100644 --- a/src/screens/Onboarding/StepFinished.tsx +++ b/src/screens/Onboarding/StepFinished.tsx @@ -127,31 +127,36 @@ export function StepFinished() { })(), (async () => { const {imageUri, imageMime} = profileStepResults - if (imageUri && imageMime) { - const blobPromise = uploadBlob(agent, imageUri, imageMime) - await agent.upsertProfile(async existing => { - existing = existing ?? {} + const blobPromise = + imageUri && imageMime + ? uploadBlob(agent, imageUri, imageMime) + : undefined + + await agent.upsertProfile(async existing => { + existing = existing ?? {} + + if (blobPromise) { const res = await blobPromise if (res.data.blob) { existing.avatar = res.data.blob } + } - if (starterPack) { - existing.joinedViaStarterPack = { - uri: starterPack.uri, - cid: starterPack.cid, - } + if (starterPack) { + existing.joinedViaStarterPack = { + uri: starterPack.uri, + cid: starterPack.cid, } + } - existing.displayName = '' - // HACKFIX - // creating a bunch of identical profile objects is breaking the relay - // tossing this unspecced field onto it to reduce the size of the problem - // -prf - existing.createdAt = new Date().toISOString() - return existing - }) - } + existing.displayName = '' + // HACKFIX + // creating a bunch of identical profile objects is breaking the relay + // tossing this unspecced field onto it to reduce the size of the problem + // -prf + existing.createdAt = new Date().toISOString() + return existing + }) logEvent('onboarding:finished:avatarResult', { avatarResult: profileStepResults.isCreatedAvatar -- cgit 1.4.1 From ff5ad3825331b292fd869fda3555629329de008e Mon Sep 17 00:00:00 2001 From: Paul Coroneos Date: Tue, 19 Nov 2024 09:33:07 -0600 Subject: Leverage jsx transform to remove unnecessary react imports and update eslint config (#6516) * update eslint config with jsx runtime * leverage jsx transform to remove unnecessary react imports and update eslint config * run yarn lint --fix to remove eslint disables related to react/prop-types that is now disabled --- .eslintrc.js | 2 ++ src/components/AvatarStack.tsx | 1 - src/components/Divider.tsx | 1 - src/components/Error.tsx | 1 - src/components/GradientFill.tsx | 1 - src/components/IconCircle.tsx | 1 - src/components/LikesDialog.tsx | 2 +- src/components/Loader.web.tsx | 1 - src/components/Menu/index.web.tsx | 2 -- src/components/ProgressGuide/List.tsx | 1 - src/components/ProgressGuide/Task.tsx | 1 - src/components/ReportDialog/SelectLabelerView.tsx | 1 - src/components/StarterPack/ShareDialog.tsx | 1 - src/components/StarterPack/Wizard/WizardEditListDialog.tsx | 2 +- src/components/StarterPack/Wizard/WizardListCard.tsx | 1 - src/components/SubtleWebHover.web.tsx | 1 - src/components/dialogs/EmbedConsent.tsx | 2 +- src/components/dialogs/SwitchAccount.tsx | 2 +- src/components/dms/ConvoMenu.tsx | 2 +- src/components/dms/LeaveConvoPrompt.tsx | 1 - src/components/dms/ReportConversationPrompt.tsx | 1 - src/components/dms/dialogs/NewChatDialog.tsx | 2 +- src/components/dms/dialogs/ShareViaChatDialog.tsx | 2 +- src/components/forms/DateField/index.shared.tsx | 1 - src/components/forms/FormError.tsx | 1 - src/components/icons/common.tsx | 1 - src/components/moderation/LabelsOnMe.tsx | 1 - src/components/moderation/ModerationDetailsDialog.tsx | 1 - src/components/moderation/PostAlerts.tsx | 1 - src/components/moderation/ProfileHeaderAlerts.tsx | 1 - src/components/video/PlayButtonIcon.tsx | 1 - src/lib/custom-animations/LikeIcon.tsx | 1 - src/lib/custom-animations/PressableScale.tsx | 1 - src/lib/icons.tsx | 1 - src/screens/Login/PasswordUpdatedForm.tsx | 1 - src/screens/Login/SetNewPasswordForm.tsx | 2 +- src/screens/Messages/ChatList.tsx | 2 +- src/screens/Messages/Settings.tsx | 2 +- src/screens/Messages/components/ChatDisabled.tsx | 2 +- src/screens/Messages/components/MessageInputEmbed.tsx | 2 +- src/screens/Profile/Header/DisplayName.tsx | 1 - src/screens/Profile/Header/EditProfileDialog.tsx | 2 +- src/screens/Profile/Header/Handle.tsx | 1 - src/screens/Profile/Header/Metrics.tsx | 1 - src/screens/Settings/AboutSettings.tsx | 1 - src/screens/Settings/AccessibilitySettings.tsx | 1 - src/screens/Settings/AccountSettings.tsx | 1 - src/screens/Settings/AppPasswords.tsx | 2 +- src/screens/Settings/ContentAndMediaSettings.tsx | 1 - src/screens/Settings/ExternalMediaPreferences.tsx | 2 +- src/screens/Settings/FollowingFeedPreferences.tsx | 1 - src/screens/Settings/LanguageSettings.tsx | 2 +- src/screens/Settings/NotificationSettings.tsx | 1 - src/screens/Settings/PrivacyAndSecuritySettings.tsx | 1 - src/screens/Settings/Settings.tsx | 2 +- src/screens/Settings/ThreadPreferences.tsx | 1 - src/screens/Settings/components/AddAppPasswordDialog.tsx | 2 +- src/screens/Settings/components/ChangeHandleDialog.tsx | 2 +- src/screens/Settings/components/CopyButton.tsx | 2 +- src/screens/Settings/components/DisableEmail2FADialog.tsx | 2 +- src/screens/Settings/components/SettingsList.tsx | 1 - src/screens/Signup/BackNextButtons.tsx | 1 - src/screens/Signup/StepInfo/Policies.tsx | 2 +- src/screens/StarterPack/Wizard/StepDetails.tsx | 1 - src/screens/StarterPack/Wizard/StepFeeds.tsx | 2 +- src/screens/StarterPack/Wizard/StepProfiles.tsx | 2 +- src/view/com/auth/SplashScreen.tsx | 1 - src/view/com/auth/util/HelpTip.tsx | 1 - src/view/com/auth/util/TextInput.tsx | 2 +- src/view/com/composer/ExternalEmbedRemoveBtn.tsx | 1 - src/view/com/composer/GifAltText.tsx | 2 +- src/view/com/composer/char-progress/CharProgress.tsx | 1 - src/view/com/composer/labels/LabelsBtn.tsx | 1 - src/view/com/composer/photos/OpenCameraBtn.tsx | 2 +- src/view/com/composer/photos/SelectGifBtn.tsx | 2 +- src/view/com/composer/photos/SelectPhotoBtn.tsx | 2 +- src/view/com/composer/select-language/SelectLangBtn.tsx | 2 +- src/view/com/composer/select-language/SuggestedLanguage.tsx | 2 +- src/view/com/composer/text-input/mobile/Autocomplete.tsx | 2 +- src/view/com/composer/text-input/web/Autocomplete.tsx | 7 +------ src/view/com/composer/threadgate/ThreadgateBtn.tsx | 1 - src/view/com/composer/videos/SelectVideoBtn.tsx | 2 +- src/view/com/composer/videos/SubtitleDialog.tsx | 2 +- src/view/com/composer/videos/VideoPreview.web.tsx | 2 +- src/view/com/composer/videos/VideoTranscodeBackdrop.tsx | 1 - src/view/com/composer/videos/VideoTranscodeProgress.tsx | 1 - .../com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx | 1 - src/view/com/modals/ChangeEmail.tsx | 2 +- src/view/com/modals/ChangePassword.tsx | 2 +- src/view/com/modals/CreateOrEditList.tsx | 2 +- src/view/com/modals/EditProfile.tsx | 2 +- src/view/com/modals/Modal.tsx | 2 +- src/view/com/modals/Modal.web.tsx | 1 - src/view/com/modals/lang-settings/ConfirmLanguagesButton.tsx | 1 - src/view/com/modals/lang-settings/LanguageToggle.tsx | 1 - src/view/com/post-thread/PostLikedBy.tsx | 2 +- src/view/com/post-thread/PostQuotes.tsx | 2 +- src/view/com/post-thread/PostRepostedBy.tsx | 2 +- src/view/com/post-thread/PostThreadComposePrompt.tsx | 1 - src/view/com/post-thread/PostThreadShowHiddenReplies.tsx | 1 - src/view/com/posts/DiscoverFallbackHeader.tsx | 1 - src/view/com/profile/FollowButton.tsx | 1 - src/view/com/testing/TestCtrls.e2e.tsx | 1 - src/view/com/util/EmptyState.tsx | 1 - src/view/com/util/EmptyStateWithButton.tsx | 1 - src/view/com/util/ErrorBoundary.tsx | 2 +- src/view/com/util/FeedInfoText.tsx | 1 - src/view/com/util/LoadMoreRetryBtn.tsx | 1 - src/view/com/util/LoadingPlaceholder.tsx | 1 - src/view/com/util/LoadingScreen.tsx | 1 - src/view/com/util/PressableWithHover.tsx | 2 +- src/view/com/util/Selector.tsx | 2 +- src/view/com/util/Toast.tsx | 2 +- src/view/com/util/UserInfoText.tsx | 1 - src/view/com/util/error/ErrorMessage.tsx | 1 - src/view/com/util/error/ErrorScreen.tsx | 1 - src/view/com/util/fab/FAB.web.tsx | 1 - src/view/com/util/fab/FABInner.tsx | 2 +- src/view/com/util/forms/DateInput.tsx | 2 +- src/view/com/util/forms/DateInput.web.tsx | 2 +- src/view/com/util/forms/RadioButton.tsx | 1 - src/view/com/util/forms/RadioGroup.tsx | 2 +- src/view/com/util/forms/SelectableBtn.tsx | 1 - src/view/com/util/forms/ToggleButton.tsx | 1 - src/view/com/util/images/Image.tsx | 1 - src/view/com/util/load-latest/LoadLatestBtn.tsx | 1 - src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx | 1 - src/view/icons/Logomark.tsx | 1 - src/view/icons/Logotype.tsx | 1 - src/view/screens/Storybook/Admonitions.tsx | 1 - src/view/screens/Storybook/Breakpoints.tsx | 1 - src/view/screens/Storybook/Icons.tsx | 1 - src/view/screens/Storybook/Links.tsx | 1 - src/view/screens/Storybook/Menus.tsx | 1 - src/view/screens/Storybook/Palette.tsx | 1 - src/view/screens/Storybook/Settings.tsx | 1 - src/view/screens/Storybook/Shadows.tsx | 1 - src/view/screens/Storybook/Spacing.tsx | 1 - src/view/screens/Storybook/Theming.tsx | 1 - src/view/screens/Storybook/Typography.tsx | 1 - src/view/shell/Composer.tsx | 2 +- src/view/shell/desktop/Feeds.tsx | 1 - src/view/shell/desktop/RightNav.tsx | 1 - 143 files changed, 55 insertions(+), 148 deletions(-) (limited to 'src/components/dialogs') diff --git a/.eslintrc.js b/.eslintrc.js index 50365a09e..fefe4fa5b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,7 @@ module.exports = { extends: [ '@react-native-community', 'plugin:react/recommended', + 'plugin:react/jsx-runtime', 'plugin:react-native-a11y/ios', 'prettier', ], @@ -19,6 +20,7 @@ module.exports = { // Temporary until https://github.com/facebook/react-native/pull/43756 gets into a release. 'prettier/prettier': 0, 'react/no-unescaped-entities': 0, + 'react/prop-types': 0, 'react-native/no-inline-styles': 0, 'bsky-internal/avoid-unwrapped-text': [ 'error', diff --git a/src/components/AvatarStack.tsx b/src/components/AvatarStack.tsx index 5f790fb67..aea472512 100644 --- a/src/components/AvatarStack.tsx +++ b/src/components/AvatarStack.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {moderateProfile} from '@atproto/api' diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx index ff0bbb045..e4891aacb 100644 --- a/src/components/Divider.tsx +++ b/src/components/Divider.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, flatten, useTheme, ViewStyleProp} from '#/alf' diff --git a/src/components/Error.tsx b/src/components/Error.tsx index 2819986b3..dc8e53b46 100644 --- a/src/components/Error.tsx +++ b/src/components/Error.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/GradientFill.tsx b/src/components/GradientFill.tsx index 3c64c8960..fa39577d4 100644 --- a/src/components/GradientFill.tsx +++ b/src/components/GradientFill.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {LinearGradient} from 'expo-linear-gradient' import {atoms as a, tokens} from '#/alf' diff --git a/src/components/IconCircle.tsx b/src/components/IconCircle.tsx index 806d35c38..2119c9f8d 100644 --- a/src/components/IconCircle.tsx +++ b/src/components/IconCircle.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import { diff --git a/src/components/LikesDialog.tsx b/src/components/LikesDialog.tsx index 4c68596f7..cb000b433 100644 --- a/src/components/LikesDialog.tsx +++ b/src/components/LikesDialog.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo} from 'react' +import {useCallback, useMemo} from 'react' import {ActivityIndicator, FlatList, View} from 'react-native' import {AppBskyFeedGetLikes as GetLikes} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/components/Loader.web.tsx b/src/components/Loader.web.tsx index d8182673f..acf0acfc4 100644 --- a/src/components/Loader.web.tsx +++ b/src/components/Loader.web.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, flatten, useTheme} from '#/alf' diff --git a/src/components/Menu/index.web.tsx b/src/components/Menu/index.web.tsx index d68dcba51..37ad67e29 100644 --- a/src/components/Menu/index.web.tsx +++ b/src/components/Menu/index.web.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/prop-types */ - import React from 'react' import {Pressable, StyleProp, View, ViewStyle} from 'react-native' import {msg} from '@lingui/macro' diff --git a/src/components/ProgressGuide/List.tsx b/src/components/ProgressGuide/List.tsx index d0fd55d9c..299d1e69f 100644 --- a/src/components/ProgressGuide/List.tsx +++ b/src/components/ProgressGuide/List.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, View, ViewStyle} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/ProgressGuide/Task.tsx b/src/components/ProgressGuide/Task.tsx index f2ceba52a..973ee1ac7 100644 --- a/src/components/ProgressGuide/Task.tsx +++ b/src/components/ProgressGuide/Task.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import * as Progress from 'react-native-progress' diff --git a/src/components/ReportDialog/SelectLabelerView.tsx b/src/components/ReportDialog/SelectLabelerView.tsx index 039bbf123..df472241e 100644 --- a/src/components/ReportDialog/SelectLabelerView.tsx +++ b/src/components/ReportDialog/SelectLabelerView.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {AppBskyLabelerDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/components/StarterPack/ShareDialog.tsx b/src/components/StarterPack/ShareDialog.tsx index 997c6479c..354d7bc4e 100644 --- a/src/components/StarterPack/ShareDialog.tsx +++ b/src/components/StarterPack/ShareDialog.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {Image} from 'expo-image' import {requestMediaLibraryPermissionsAsync} from 'expo-image-picker' diff --git a/src/components/StarterPack/Wizard/WizardEditListDialog.tsx b/src/components/StarterPack/Wizard/WizardEditListDialog.tsx index 1e9f1c52d..b67a8d302 100644 --- a/src/components/StarterPack/Wizard/WizardEditListDialog.tsx +++ b/src/components/StarterPack/Wizard/WizardEditListDialog.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react' +import {useRef} from 'react' import type {ListRenderItemInfo} from 'react-native' import {View} from 'react-native' import {AppBskyActorDefs, ModerationOpts} from '@atproto/api' diff --git a/src/components/StarterPack/Wizard/WizardListCard.tsx b/src/components/StarterPack/Wizard/WizardListCard.tsx index 44f01a154..75d2bff60 100644 --- a/src/components/StarterPack/Wizard/WizardListCard.tsx +++ b/src/components/StarterPack/Wizard/WizardListCard.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Keyboard, View} from 'react-native' import { AppBskyActorDefs, diff --git a/src/components/SubtleWebHover.web.tsx b/src/components/SubtleWebHover.web.tsx index adabf46bf..8943147e4 100644 --- a/src/components/SubtleWebHover.web.tsx +++ b/src/components/SubtleWebHover.web.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import {isTouchDevice} from '#/lib/browser' diff --git a/src/components/dialogs/EmbedConsent.tsx b/src/components/dialogs/EmbedConsent.tsx index 824155d8b..086d43f95 100644 --- a/src/components/dialogs/EmbedConsent.tsx +++ b/src/components/dialogs/EmbedConsent.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/dialogs/SwitchAccount.tsx b/src/components/dialogs/SwitchAccount.tsx index daad01d2a..9acefa8fc 100644 --- a/src/components/dialogs/SwitchAccount.tsx +++ b/src/components/dialogs/SwitchAccount.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/dms/ConvoMenu.tsx b/src/components/dms/ConvoMenu.tsx index affc292c1..e1f8df10b 100644 --- a/src/components/dms/ConvoMenu.tsx +++ b/src/components/dms/ConvoMenu.tsx @@ -115,7 +115,7 @@ let ConvoMenu = ({ {...props} onPress={() => { Keyboard.dismiss() - // eslint-disable-next-line react/prop-types -- eslint is confused by the name `props` + props.onPress() }} style={[ diff --git a/src/components/dms/LeaveConvoPrompt.tsx b/src/components/dms/LeaveConvoPrompt.tsx index 2baa07b46..cc18c1ab4 100644 --- a/src/components/dms/LeaveConvoPrompt.tsx +++ b/src/components/dms/LeaveConvoPrompt.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' diff --git a/src/components/dms/ReportConversationPrompt.tsx b/src/components/dms/ReportConversationPrompt.tsx index 610cfbcf9..6bb26a60f 100644 --- a/src/components/dms/ReportConversationPrompt.tsx +++ b/src/components/dms/ReportConversationPrompt.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/dms/dialogs/NewChatDialog.tsx b/src/components/dms/dialogs/NewChatDialog.tsx index f402201a2..c7fedb488 100644 --- a/src/components/dms/dialogs/NewChatDialog.tsx +++ b/src/components/dms/dialogs/NewChatDialog.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/dms/dialogs/ShareViaChatDialog.tsx b/src/components/dms/dialogs/ShareViaChatDialog.tsx index 38b558343..4bb27ae69 100644 --- a/src/components/dms/dialogs/ShareViaChatDialog.tsx +++ b/src/components/dms/dialogs/ShareViaChatDialog.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/forms/DateField/index.shared.tsx b/src/components/forms/DateField/index.shared.tsx index 814bbed7c..7438f5622 100644 --- a/src/components/forms/DateField/index.shared.tsx +++ b/src/components/forms/DateField/index.shared.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Pressable, View} from 'react-native' import {useLingui} from '@lingui/react' diff --git a/src/components/forms/FormError.tsx b/src/components/forms/FormError.tsx index 8ab6e3f35..d51243d50 100644 --- a/src/components/forms/FormError.tsx +++ b/src/components/forms/FormError.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/components/icons/common.tsx b/src/components/icons/common.tsx index e83f96f0b..996ecb626 100644 --- a/src/components/icons/common.tsx +++ b/src/components/icons/common.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, TextProps} from 'react-native' import type {PathProps, SvgProps} from 'react-native-svg' import {Defs, LinearGradient, Stop} from 'react-native-svg' diff --git a/src/components/moderation/LabelsOnMe.tsx b/src/components/moderation/LabelsOnMe.tsx index 33ede3ed2..681599807 100644 --- a/src/components/moderation/LabelsOnMe.tsx +++ b/src/components/moderation/LabelsOnMe.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, View, ViewStyle} from 'react-native' import {AppBskyFeedDefs, ComAtprotoLabelDefs} from '@atproto/api' import {msg, Plural} from '@lingui/macro' diff --git a/src/components/moderation/ModerationDetailsDialog.tsx b/src/components/moderation/ModerationDetailsDialog.tsx index ef40a7996..bdbb2daa5 100644 --- a/src/components/moderation/ModerationDetailsDialog.tsx +++ b/src/components/moderation/ModerationDetailsDialog.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {ModerationCause} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/components/moderation/PostAlerts.tsx b/src/components/moderation/PostAlerts.tsx index 6c4e5f8c8..a68a650d6 100644 --- a/src/components/moderation/PostAlerts.tsx +++ b/src/components/moderation/PostAlerts.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, ViewStyle} from 'react-native' import {ModerationCause, ModerationUI} from '@atproto/api' diff --git a/src/components/moderation/ProfileHeaderAlerts.tsx b/src/components/moderation/ProfileHeaderAlerts.tsx index 891caec18..4ac561fd9 100644 --- a/src/components/moderation/ProfileHeaderAlerts.tsx +++ b/src/components/moderation/ProfileHeaderAlerts.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, ViewStyle} from 'react-native' import {ModerationDecision} from '@atproto/api' diff --git a/src/components/video/PlayButtonIcon.tsx b/src/components/video/PlayButtonIcon.tsx index 8e0a6bb7a..84a450767 100644 --- a/src/components/video/PlayButtonIcon.tsx +++ b/src/components/video/PlayButtonIcon.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/lib/custom-animations/LikeIcon.tsx b/src/lib/custom-animations/LikeIcon.tsx index 1bc48d43b..025e96f4b 100644 --- a/src/lib/custom-animations/LikeIcon.tsx +++ b/src/lib/custom-animations/LikeIcon.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import Animated, { Keyframe, diff --git a/src/lib/custom-animations/PressableScale.tsx b/src/lib/custom-animations/PressableScale.tsx index 1e776546d..9ac7e5eb2 100644 --- a/src/lib/custom-animations/PressableScale.tsx +++ b/src/lib/custom-animations/PressableScale.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Pressable, PressableProps, StyleProp, ViewStyle} from 'react-native' import Animated, { cancelAnimation, diff --git a/src/lib/icons.tsx b/src/lib/icons.tsx index aefa9c9c3..3690783d3 100644 --- a/src/lib/icons.tsx +++ b/src/lib/icons.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, TextStyle, ViewStyle} from 'react-native' import Svg, {Ellipse, Line, Path, Rect} from 'react-native-svg' diff --git a/src/screens/Login/PasswordUpdatedForm.tsx b/src/screens/Login/PasswordUpdatedForm.tsx index 9c12a47e3..b85815018 100644 --- a/src/screens/Login/PasswordUpdatedForm.tsx +++ b/src/screens/Login/PasswordUpdatedForm.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Login/SetNewPasswordForm.tsx b/src/screens/Login/SetNewPasswordForm.tsx index 9efbb96ce..4d09e32a3 100644 --- a/src/screens/Login/SetNewPasswordForm.tsx +++ b/src/screens/Login/SetNewPasswordForm.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {ActivityIndicator, View} from 'react-native' import {BskyAgent} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/screens/Messages/ChatList.tsx b/src/screens/Messages/ChatList.tsx index 45b3bf14f..4f2bd251f 100644 --- a/src/screens/Messages/ChatList.tsx +++ b/src/screens/Messages/ChatList.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useMemo, useState} from 'react' +import {useCallback, useEffect, useMemo, useState} from 'react' import {View} from 'react-native' import {ChatBskyConvoDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/screens/Messages/Settings.tsx b/src/screens/Messages/Settings.tsx index 93e3bc400..50b1c4cc9 100644 --- a/src/screens/Messages/Settings.tsx +++ b/src/screens/Messages/Settings.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Messages/components/ChatDisabled.tsx b/src/screens/Messages/components/ChatDisabled.tsx index c768d2504..5e9f57fa5 100644 --- a/src/screens/Messages/components/ChatDisabled.tsx +++ b/src/screens/Messages/components/ChatDisabled.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react' +import {useCallback, useState} from 'react' import {View} from 'react-native' import {ComAtprotoModerationDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/screens/Messages/components/MessageInputEmbed.tsx b/src/screens/Messages/components/MessageInputEmbed.tsx index 2d1551019..6df0ef2fc 100644 --- a/src/screens/Messages/components/MessageInputEmbed.tsx +++ b/src/screens/Messages/components/MessageInputEmbed.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useMemo, useState} from 'react' +import {useCallback, useEffect, useMemo, useState} from 'react' import {LayoutAnimation, View} from 'react-native' import { AppBskyFeedPost, diff --git a/src/screens/Profile/Header/DisplayName.tsx b/src/screens/Profile/Header/DisplayName.tsx index 6d4eea2eb..b74c063d4 100644 --- a/src/screens/Profile/Header/DisplayName.tsx +++ b/src/screens/Profile/Header/DisplayName.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {AppBskyActorDefs, ModerationDecision} from '@atproto/api' diff --git a/src/screens/Profile/Header/EditProfileDialog.tsx b/src/screens/Profile/Header/EditProfileDialog.tsx index af4b5498a..952184816 100644 --- a/src/screens/Profile/Header/EditProfileDialog.tsx +++ b/src/screens/Profile/Header/EditProfileDialog.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useState} from 'react' +import {useCallback, useEffect, useState} from 'react' import {Dimensions, View} from 'react-native' import {Image as RNImage} from 'react-native-image-crop-picker' import {AppBskyActorDefs} from '@atproto/api' diff --git a/src/screens/Profile/Header/Handle.tsx b/src/screens/Profile/Header/Handle.tsx index acfba3fb2..310378215 100644 --- a/src/screens/Profile/Header/Handle.tsx +++ b/src/screens/Profile/Header/Handle.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {AppBskyActorDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/screens/Profile/Header/Metrics.tsx b/src/screens/Profile/Header/Metrics.tsx index 30686ef99..bd4c4521c 100644 --- a/src/screens/Profile/Header/Metrics.tsx +++ b/src/screens/Profile/Header/Metrics.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {AppBskyActorDefs} from '@atproto/api' import {msg, plural} from '@lingui/macro' diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx index 3c445b966..8019a20f9 100644 --- a/src/screens/Settings/AboutSettings.tsx +++ b/src/screens/Settings/AboutSettings.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Platform} from 'react-native' import {setStringAsync} from 'expo-clipboard' import {msg, Trans} from '@lingui/macro' diff --git a/src/screens/Settings/AccessibilitySettings.tsx b/src/screens/Settings/AccessibilitySettings.tsx index dfe2c14a5..6ab0131d9 100644 --- a/src/screens/Settings/AccessibilitySettings.tsx +++ b/src/screens/Settings/AccessibilitySettings.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {NativeStackScreenProps} from '@react-navigation/native-stack' diff --git a/src/screens/Settings/AccountSettings.tsx b/src/screens/Settings/AccountSettings.tsx index 35c5f3aa0..2495a0f2f 100644 --- a/src/screens/Settings/AccountSettings.tsx +++ b/src/screens/Settings/AccountSettings.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {NativeStackScreenProps} from '@react-navigation/native-stack' diff --git a/src/screens/Settings/AppPasswords.tsx b/src/screens/Settings/AppPasswords.tsx index 8cebf97ce..1ea0bd1b3 100644 --- a/src/screens/Settings/AppPasswords.tsx +++ b/src/screens/Settings/AppPasswords.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {View} from 'react-native' import Animated, { FadeIn, diff --git a/src/screens/Settings/ContentAndMediaSettings.tsx b/src/screens/Settings/ContentAndMediaSettings.tsx index 6d293fbea..b3fb8c174 100644 --- a/src/screens/Settings/ContentAndMediaSettings.tsx +++ b/src/screens/Settings/ContentAndMediaSettings.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {NativeStackScreenProps} from '@react-navigation/native-stack' diff --git a/src/screens/Settings/ExternalMediaPreferences.tsx b/src/screens/Settings/ExternalMediaPreferences.tsx index 91c7ea7fc..f7e081429 100644 --- a/src/screens/Settings/ExternalMediaPreferences.tsx +++ b/src/screens/Settings/ExternalMediaPreferences.tsx @@ -1,4 +1,4 @@ -import React, {Fragment} from 'react' +import {Fragment} from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Settings/FollowingFeedPreferences.tsx b/src/screens/Settings/FollowingFeedPreferences.tsx index 12de2a31a..089491dd0 100644 --- a/src/screens/Settings/FollowingFeedPreferences.tsx +++ b/src/screens/Settings/FollowingFeedPreferences.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Settings/LanguageSettings.tsx b/src/screens/Settings/LanguageSettings.tsx index c6cd8bb5a..acad0520c 100644 --- a/src/screens/Settings/LanguageSettings.tsx +++ b/src/screens/Settings/LanguageSettings.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo} from 'react' +import {useCallback, useMemo} from 'react' import {View} from 'react-native' import RNPickerSelect, {PickerSelectProps} from 'react-native-picker-select' import {msg, Trans} from '@lingui/macro' diff --git a/src/screens/Settings/NotificationSettings.tsx b/src/screens/Settings/NotificationSettings.tsx index 8e1033742..c5f7078c4 100644 --- a/src/screens/Settings/NotificationSettings.tsx +++ b/src/screens/Settings/NotificationSettings.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Text} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Settings/PrivacyAndSecuritySettings.tsx b/src/screens/Settings/PrivacyAndSecuritySettings.tsx index 12e28e0d2..d695f830d 100644 --- a/src/screens/Settings/PrivacyAndSecuritySettings.tsx +++ b/src/screens/Settings/PrivacyAndSecuritySettings.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Settings/Settings.tsx b/src/screens/Settings/Settings.tsx index adea42e5e..126a1bc88 100644 --- a/src/screens/Settings/Settings.tsx +++ b/src/screens/Settings/Settings.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {LayoutAnimation, Pressable, View} from 'react-native' import {Linking} from 'react-native' import {useReducedMotion} from 'react-native-reanimated' diff --git a/src/screens/Settings/ThreadPreferences.tsx b/src/screens/Settings/ThreadPreferences.tsx index 24dd91bf6..c27cea7de 100644 --- a/src/screens/Settings/ThreadPreferences.tsx +++ b/src/screens/Settings/ThreadPreferences.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Settings/components/AddAppPasswordDialog.tsx b/src/screens/Settings/components/AddAppPasswordDialog.tsx index dcb212879..927875778 100644 --- a/src/screens/Settings/components/AddAppPasswordDialog.tsx +++ b/src/screens/Settings/components/AddAppPasswordDialog.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useMemo, useState} from 'react' +import {useEffect, useMemo, useState} from 'react' import {useWindowDimensions, View} from 'react-native' import Animated, { FadeIn, diff --git a/src/screens/Settings/components/ChangeHandleDialog.tsx b/src/screens/Settings/components/ChangeHandleDialog.tsx index e76d6257f..f0e8684bb 100644 --- a/src/screens/Settings/components/ChangeHandleDialog.tsx +++ b/src/screens/Settings/components/ChangeHandleDialog.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo, useState} from 'react' +import {useCallback, useMemo, useState} from 'react' import {useWindowDimensions, View} from 'react-native' import Animated, { FadeIn, diff --git a/src/screens/Settings/components/CopyButton.tsx b/src/screens/Settings/components/CopyButton.tsx index 8c6cdfa8a..82c11f58d 100644 --- a/src/screens/Settings/components/CopyButton.tsx +++ b/src/screens/Settings/components/CopyButton.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useState} from 'react' +import {useCallback, useEffect, useState} from 'react' import {GestureResponderEvent, View} from 'react-native' import Animated, { FadeOutUp, diff --git a/src/screens/Settings/components/DisableEmail2FADialog.tsx b/src/screens/Settings/components/DisableEmail2FADialog.tsx index 1378759b0..8ee49c989 100644 --- a/src/screens/Settings/components/DisableEmail2FADialog.tsx +++ b/src/screens/Settings/components/DisableEmail2FADialog.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Settings/components/SettingsList.tsx b/src/screens/Settings/components/SettingsList.tsx index 07117aef3..520df4118 100644 --- a/src/screens/Settings/components/SettingsList.tsx +++ b/src/screens/Settings/components/SettingsList.tsx @@ -213,7 +213,6 @@ export function ItemIcon({ } export function ItemText({ - // eslint-disable-next-line react/prop-types style, ...props }: React.ComponentProps) { diff --git a/src/screens/Signup/BackNextButtons.tsx b/src/screens/Signup/BackNextButtons.tsx index e2401bb11..888b9071e 100644 --- a/src/screens/Signup/BackNextButtons.tsx +++ b/src/screens/Signup/BackNextButtons.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/Signup/StepInfo/Policies.tsx b/src/screens/Signup/StepInfo/Policies.tsx index ba0cfc2b4..3cde95be7 100644 --- a/src/screens/Signup/StepInfo/Policies.tsx +++ b/src/screens/Signup/StepInfo/Policies.tsx @@ -1,4 +1,4 @@ -import React, {ReactElement} from 'react' +import {ReactElement} from 'react' import {View} from 'react-native' import {ComAtprotoServerDescribeServer} from '@atproto/api' import {msg, Trans} from '@lingui/macro' diff --git a/src/screens/StarterPack/Wizard/StepDetails.tsx b/src/screens/StarterPack/Wizard/StepDetails.tsx index 4ee2cada9..49de979ee 100644 --- a/src/screens/StarterPack/Wizard/StepDetails.tsx +++ b/src/screens/StarterPack/Wizard/StepDetails.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/screens/StarterPack/Wizard/StepFeeds.tsx b/src/screens/StarterPack/Wizard/StepFeeds.tsx index 0cf6ab231..b776e9551 100644 --- a/src/screens/StarterPack/Wizard/StepFeeds.tsx +++ b/src/screens/StarterPack/Wizard/StepFeeds.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {ListRenderItemInfo, View} from 'react-native' import {KeyboardAwareScrollView} from 'react-native-keyboard-controller' import {AppBskyFeedDefs, ModerationOpts} from '@atproto/api' diff --git a/src/screens/StarterPack/Wizard/StepProfiles.tsx b/src/screens/StarterPack/Wizard/StepProfiles.tsx index 054a6a63e..68f0edb90 100644 --- a/src/screens/StarterPack/Wizard/StepProfiles.tsx +++ b/src/screens/StarterPack/Wizard/StepProfiles.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {ListRenderItemInfo, View} from 'react-native' import {KeyboardAwareScrollView} from 'react-native-keyboard-controller' import {AppBskyActorDefs, ModerationOpts} from '@atproto/api' diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx index ae18f1390..e205bb540 100644 --- a/src/view/com/auth/SplashScreen.tsx +++ b/src/view/com/auth/SplashScreen.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {msg, Trans} from '@lingui/macro' diff --git a/src/view/com/auth/util/HelpTip.tsx b/src/view/com/auth/util/HelpTip.tsx index 0fac86bec..196f30412 100644 --- a/src/view/com/auth/util/HelpTip.tsx +++ b/src/view/com/auth/util/HelpTip.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle' diff --git a/src/view/com/auth/util/TextInput.tsx b/src/view/com/auth/util/TextInput.tsx index 0ccbe6ac4..083dda555 100644 --- a/src/view/com/auth/util/TextInput.tsx +++ b/src/view/com/auth/util/TextInput.tsx @@ -1,4 +1,4 @@ -import React, {ComponentProps} from 'react' +import {ComponentProps} from 'react' import {StyleSheet, TextInput as RNTextInput, View} from 'react-native' import {IconProp} from '@fortawesome/fontawesome-svg-core' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' diff --git a/src/view/com/composer/ExternalEmbedRemoveBtn.tsx b/src/view/com/composer/ExternalEmbedRemoveBtn.tsx index 3ef9dad47..92102f847 100644 --- a/src/view/com/composer/ExternalEmbedRemoveBtn.tsx +++ b/src/view/com/composer/ExternalEmbedRemoveBtn.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/composer/GifAltText.tsx b/src/view/com/composer/GifAltText.tsx index ef5f8a3a5..bd99b9f28 100644 --- a/src/view/com/composer/GifAltText.tsx +++ b/src/view/com/composer/GifAltText.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {TouchableOpacity, View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/composer/char-progress/CharProgress.tsx b/src/view/com/composer/char-progress/CharProgress.tsx index c7d9628d6..f2734e4ec 100644 --- a/src/view/com/composer/char-progress/CharProgress.tsx +++ b/src/view/com/composer/char-progress/CharProgress.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, TextStyle, View, ViewStyle} from 'react-native' // @ts-ignore no type definition -prf import ProgressCircle from 'react-native-progress/Circle' diff --git a/src/view/com/composer/labels/LabelsBtn.tsx b/src/view/com/composer/labels/LabelsBtn.tsx index 174648648..0718a1928 100644 --- a/src/view/com/composer/labels/LabelsBtn.tsx +++ b/src/view/com/composer/labels/LabelsBtn.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Keyboard, View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/composer/photos/OpenCameraBtn.tsx b/src/view/com/composer/photos/OpenCameraBtn.tsx index 79d59a92d..fb3ab5c8f 100644 --- a/src/view/com/composer/photos/OpenCameraBtn.tsx +++ b/src/view/com/composer/photos/OpenCameraBtn.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import * as MediaLibrary from 'expo-media-library' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/composer/photos/SelectGifBtn.tsx b/src/view/com/composer/photos/SelectGifBtn.tsx index 74f9acdc6..3fb0e00d2 100644 --- a/src/view/com/composer/photos/SelectGifBtn.tsx +++ b/src/view/com/composer/photos/SelectGifBtn.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useRef} from 'react' +import {useCallback, useRef} from 'react' import {Keyboard} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/composer/photos/SelectPhotoBtn.tsx b/src/view/com/composer/photos/SelectPhotoBtn.tsx index 37bfbafe6..f4c6aa328 100644 --- a/src/view/com/composer/photos/SelectPhotoBtn.tsx +++ b/src/view/com/composer/photos/SelectPhotoBtn.tsx @@ -1,5 +1,5 @@ /* eslint-disable react-native-a11y/has-valid-accessibility-ignores-invert-colors */ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/composer/select-language/SelectLangBtn.tsx b/src/view/com/composer/select-language/SelectLangBtn.tsx index 94dbc35c6..cd3cb608d 100644 --- a/src/view/com/composer/select-language/SelectLangBtn.tsx +++ b/src/view/com/composer/select-language/SelectLangBtn.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo} from 'react' +import {useCallback, useMemo} from 'react' import {Keyboard, StyleSheet} from 'react-native' import { FontAwesomeIcon, diff --git a/src/view/com/composer/select-language/SuggestedLanguage.tsx b/src/view/com/composer/select-language/SuggestedLanguage.tsx index e915f4c66..6d55aeb53 100644 --- a/src/view/com/composer/select-language/SuggestedLanguage.tsx +++ b/src/view/com/composer/select-language/SuggestedLanguage.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useState} from 'react' +import {useEffect, useState} from 'react' import {StyleSheet, View} from 'react-native' import { FontAwesomeIcon, diff --git a/src/view/com/composer/text-input/mobile/Autocomplete.tsx b/src/view/com/composer/text-input/mobile/Autocomplete.tsx index 3d2bcfa61..f1b594136 100644 --- a/src/view/com/composer/text-input/mobile/Autocomplete.tsx +++ b/src/view/com/composer/text-input/mobile/Autocomplete.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react' +import {useRef} from 'react' import {View} from 'react-native' import Animated, {FadeInDown, FadeOut} from 'react-native-reanimated' import {AppBskyActorDefs} from '@atproto/api' diff --git a/src/view/com/composer/text-input/web/Autocomplete.tsx b/src/view/com/composer/text-input/web/Autocomplete.tsx index a43e67c04..0599ddb39 100644 --- a/src/view/com/composer/text-input/web/Autocomplete.tsx +++ b/src/view/com/composer/text-input/web/Autocomplete.tsx @@ -1,9 +1,4 @@ -import React, { - forwardRef, - useEffect, - useImperativeHandle, - useState, -} from 'react' +import {forwardRef, useEffect, useImperativeHandle, useState} from 'react' import {Pressable, StyleSheet, View} from 'react-native' import {Trans} from '@lingui/macro' import {ReactRenderer} from '@tiptap/react' diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index 78bf8c06f..4130cc7e4 100644 --- a/src/view/com/composer/threadgate/ThreadgateBtn.tsx +++ b/src/view/com/composer/threadgate/ThreadgateBtn.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Keyboard, StyleProp, ViewStyle} from 'react-native' import {AnimatedStyle} from 'react-native-reanimated' import {AppBskyFeedPostgate} from '@atproto/api' diff --git a/src/view/com/composer/videos/SelectVideoBtn.tsx b/src/view/com/composer/videos/SelectVideoBtn.tsx index 2ba003a6d..ac9ae521c 100644 --- a/src/view/com/composer/videos/SelectVideoBtn.tsx +++ b/src/view/com/composer/videos/SelectVideoBtn.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {useCallback} from 'react' import {Keyboard} from 'react-native' import { ImagePickerAsset, diff --git a/src/view/com/composer/videos/SubtitleDialog.tsx b/src/view/com/composer/videos/SubtitleDialog.tsx index 27c3de02b..e907dc41c 100644 --- a/src/view/com/composer/videos/SubtitleDialog.tsx +++ b/src/view/com/composer/videos/SubtitleDialog.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react' +import {useCallback, useState} from 'react' import {Keyboard, StyleProp, View, ViewStyle} from 'react-native' import RNPickerSelect from 'react-native-picker-select' import {msg, Trans} from '@lingui/macro' diff --git a/src/view/com/composer/videos/VideoPreview.web.tsx b/src/view/com/composer/videos/VideoPreview.web.tsx index ccb3391c2..5b3f727a9 100644 --- a/src/view/com/composer/videos/VideoPreview.web.tsx +++ b/src/view/com/composer/videos/VideoPreview.web.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useRef} from 'react' +import {useEffect, useRef} from 'react' import {View} from 'react-native' import {ImagePickerAsset} from 'expo-image-picker' import {msg} from '@lingui/macro' diff --git a/src/view/com/composer/videos/VideoTranscodeBackdrop.tsx b/src/view/com/composer/videos/VideoTranscodeBackdrop.tsx index 249e802a4..caf0b38e2 100644 --- a/src/view/com/composer/videos/VideoTranscodeBackdrop.tsx +++ b/src/view/com/composer/videos/VideoTranscodeBackdrop.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {clearCache, createVideoThumbnail} from 'react-native-compressor' import Animated, {FadeIn} from 'react-native-reanimated' import {Image} from 'expo-image' diff --git a/src/view/com/composer/videos/VideoTranscodeProgress.tsx b/src/view/com/composer/videos/VideoTranscodeProgress.tsx index f6f0f7ccf..f408be720 100644 --- a/src/view/com/composer/videos/VideoTranscodeProgress.tsx +++ b/src/view/com/composer/videos/VideoTranscodeProgress.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' // @ts-expect-error no type definition import ProgressPie from 'react-native-progress/Pie' diff --git a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx index e7caa58a8..7a37c7e41 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. * */ -import React from 'react' import { SafeAreaView, StyleSheet, diff --git a/src/view/com/modals/ChangeEmail.tsx b/src/view/com/modals/ChangeEmail.tsx index dc450705e..647a08c0e 100644 --- a/src/view/com/modals/ChangeEmail.tsx +++ b/src/view/com/modals/ChangeEmail.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {ActivityIndicator, SafeAreaView, StyleSheet, View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/modals/ChangePassword.tsx b/src/view/com/modals/ChangePassword.tsx index c40fcb5e3..d68b4e453 100644 --- a/src/view/com/modals/ChangePassword.tsx +++ b/src/view/com/modals/ChangePassword.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import { ActivityIndicator, SafeAreaView, diff --git a/src/view/com/modals/CreateOrEditList.tsx b/src/view/com/modals/CreateOrEditList.tsx index 8f5487733..a9acd4c62 100644 --- a/src/view/com/modals/CreateOrEditList.tsx +++ b/src/view/com/modals/CreateOrEditList.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo, useState} from 'react' +import {useCallback, useMemo, useState} from 'react' import { ActivityIndicator, KeyboardAvoidingView, diff --git a/src/view/com/modals/EditProfile.tsx b/src/view/com/modals/EditProfile.tsx index 1e94f483e..af55e4b7f 100644 --- a/src/view/com/modals/EditProfile.tsx +++ b/src/view/com/modals/EditProfile.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react' +import {useCallback, useState} from 'react' import { ActivityIndicator, KeyboardAvoidingView, diff --git a/src/view/com/modals/Modal.tsx b/src/view/com/modals/Modal.tsx index 78f4a0117..1cbb9dd9d 100644 --- a/src/view/com/modals/Modal.tsx +++ b/src/view/com/modals/Modal.tsx @@ -1,4 +1,4 @@ -import React, {Fragment, useEffect, useRef} from 'react' +import {Fragment, useEffect, useRef} from 'react' import {StyleSheet} from 'react-native' import {SafeAreaView} from 'react-native-safe-area-context' import BottomSheet from '@discord/bottom-sheet/src' diff --git a/src/view/com/modals/Modal.web.tsx b/src/view/com/modals/Modal.web.tsx index e9d9c01dd..8d93c21b4 100644 --- a/src/view/com/modals/Modal.web.tsx +++ b/src/view/com/modals/Modal.web.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, TouchableWithoutFeedback, View} from 'react-native' import Animated, {FadeIn, FadeOut} from 'react-native-reanimated' diff --git a/src/view/com/modals/lang-settings/ConfirmLanguagesButton.tsx b/src/view/com/modals/lang-settings/ConfirmLanguagesButton.tsx index 8755a2fbb..f61fe73fe 100644 --- a/src/view/com/modals/lang-settings/ConfirmLanguagesButton.tsx +++ b/src/view/com/modals/lang-settings/ConfirmLanguagesButton.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Pressable, StyleSheet, Text, View} from 'react-native' import {LinearGradient} from 'expo-linear-gradient' import {msg, Trans} from '@lingui/macro' diff --git a/src/view/com/modals/lang-settings/LanguageToggle.tsx b/src/view/com/modals/lang-settings/LanguageToggle.tsx index b8c0121e6..165a70ba2 100644 --- a/src/view/com/modals/lang-settings/LanguageToggle.tsx +++ b/src/view/com/modals/lang-settings/LanguageToggle.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet} from 'react-native' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/post-thread/PostLikedBy.tsx b/src/view/com/post-thread/PostLikedBy.tsx index 69e04e046..4c0d973a9 100644 --- a/src/view/com/post-thread/PostLikedBy.tsx +++ b/src/view/com/post-thread/PostLikedBy.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo, useState} from 'react' +import {useCallback, useMemo, useState} from 'react' import {AppBskyFeedGetLikes as GetLikes} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/post-thread/PostQuotes.tsx b/src/view/com/post-thread/PostQuotes.tsx index 56cf81a3e..10a51166c 100644 --- a/src/view/com/post-thread/PostQuotes.tsx +++ b/src/view/com/post-thread/PostQuotes.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react' +import {useCallback, useState} from 'react' import { AppBskyFeedDefs, AppBskyFeedPost, diff --git a/src/view/com/post-thread/PostRepostedBy.tsx b/src/view/com/post-thread/PostRepostedBy.tsx index 67a89e435..dfaa69780 100644 --- a/src/view/com/post-thread/PostRepostedBy.tsx +++ b/src/view/com/post-thread/PostRepostedBy.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useMemo, useState} from 'react' +import {useCallback, useMemo, useState} from 'react' import {AppBskyActorDefs as ActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/post-thread/PostThreadComposePrompt.tsx b/src/view/com/post-thread/PostThreadComposePrompt.tsx index 89993beec..705572c06 100644 --- a/src/view/com/post-thread/PostThreadComposePrompt.tsx +++ b/src/view/com/post-thread/PostThreadComposePrompt.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/post-thread/PostThreadShowHiddenReplies.tsx b/src/view/com/post-thread/PostThreadShowHiddenReplies.tsx index 7c021d88b..030a92bc2 100644 --- a/src/view/com/post-thread/PostThreadShowHiddenReplies.tsx +++ b/src/view/com/post-thread/PostThreadShowHiddenReplies.tsx @@ -1,4 +1,3 @@ -import * as React from 'react' import {View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/posts/DiscoverFallbackHeader.tsx b/src/view/com/posts/DiscoverFallbackHeader.tsx index 0153cf5f4..e35a33aaf 100644 --- a/src/view/com/posts/DiscoverFallbackHeader.tsx +++ b/src/view/com/posts/DiscoverFallbackHeader.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {Trans} from '@lingui/macro' diff --git a/src/view/com/profile/FollowButton.tsx b/src/view/com/profile/FollowButton.tsx index aaa5d3454..c2d76316e 100644 --- a/src/view/com/profile/FollowButton.tsx +++ b/src/view/com/profile/FollowButton.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, TextStyle, View} from 'react-native' import {AppBskyActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' diff --git a/src/view/com/testing/TestCtrls.e2e.tsx b/src/view/com/testing/TestCtrls.e2e.tsx index 71c5f1da1..5c8b21373 100644 --- a/src/view/com/testing/TestCtrls.e2e.tsx +++ b/src/view/com/testing/TestCtrls.e2e.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {LogBox, Pressable, View} from 'react-native' import {useQueryClient} from '@tanstack/react-query' diff --git a/src/view/com/util/EmptyState.tsx b/src/view/com/util/EmptyState.tsx index 587d84462..7f1632936 100644 --- a/src/view/com/util/EmptyState.tsx +++ b/src/view/com/util/EmptyState.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' import {IconProp} from '@fortawesome/fontawesome-svg-core' import { diff --git a/src/view/com/util/EmptyStateWithButton.tsx b/src/view/com/util/EmptyStateWithButton.tsx index 7b7aa129e..fcac6df08 100644 --- a/src/view/com/util/EmptyStateWithButton.tsx +++ b/src/view/com/util/EmptyStateWithButton.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import {IconProp} from '@fortawesome/fontawesome-svg-core' import { diff --git a/src/view/com/util/ErrorBoundary.tsx b/src/view/com/util/ErrorBoundary.tsx index 46b94932b..c4211ffbc 100644 --- a/src/view/com/util/ErrorBoundary.tsx +++ b/src/view/com/util/ErrorBoundary.tsx @@ -1,4 +1,4 @@ -import React, {Component, ErrorInfo, ReactNode} from 'react' +import {Component, ErrorInfo, ReactNode} from 'react' import {StyleProp, ViewStyle} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/FeedInfoText.tsx b/src/view/com/util/FeedInfoText.tsx index da5c48af7..55eb1bad4 100644 --- a/src/view/com/util/FeedInfoText.tsx +++ b/src/view/com/util/FeedInfoText.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, StyleSheet, TextStyle} from 'react-native' import {sanitizeDisplayName} from '#/lib/strings/display-names' diff --git a/src/view/com/util/LoadMoreRetryBtn.tsx b/src/view/com/util/LoadMoreRetryBtn.tsx index 863e8e2f5..07bd733ea 100644 --- a/src/view/com/util/LoadMoreRetryBtn.tsx +++ b/src/view/com/util/LoadMoreRetryBtn.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet} from 'react-native' import { FontAwesomeIcon, diff --git a/src/view/com/util/LoadingPlaceholder.tsx b/src/view/com/util/LoadingPlaceholder.tsx index 6620eb8e2..d6bba435a 100644 --- a/src/view/com/util/LoadingPlaceholder.tsx +++ b/src/view/com/util/LoadingPlaceholder.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { DimensionValue, StyleProp, diff --git a/src/view/com/util/LoadingScreen.tsx b/src/view/com/util/LoadingScreen.tsx index 15066d625..5d2aeb38f 100644 --- a/src/view/com/util/LoadingScreen.tsx +++ b/src/view/com/util/LoadingScreen.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {ActivityIndicator, View} from 'react-native' import {s} from '#/lib/styles' diff --git a/src/view/com/util/PressableWithHover.tsx b/src/view/com/util/PressableWithHover.tsx index 48659e229..19a1968cc 100644 --- a/src/view/com/util/PressableWithHover.tsx +++ b/src/view/com/util/PressableWithHover.tsx @@ -1,4 +1,4 @@ -import React, {forwardRef, PropsWithChildren} from 'react' +import {forwardRef, PropsWithChildren} from 'react' import {Pressable, PressableProps, StyleProp, ViewStyle} from 'react-native' import {View} from 'react-native' diff --git a/src/view/com/util/Selector.tsx b/src/view/com/util/Selector.tsx index cf9d347af..86bd322e3 100644 --- a/src/view/com/util/Selector.tsx +++ b/src/view/com/util/Selector.tsx @@ -1,4 +1,4 @@ -import React, {createRef, useMemo, useRef, useState} from 'react' +import {createRef, useMemo, useRef, useState} from 'react' import {Animated, Pressable, StyleSheet, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/Toast.tsx b/src/view/com/util/Toast.tsx index 51e76bdc3..105afe13d 100644 --- a/src/view/com/util/Toast.tsx +++ b/src/view/com/util/Toast.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useState} from 'react' +import {useEffect, useState} from 'react' import {View} from 'react-native' import Animated, {FadeInUp, FadeOutUp} from 'react-native-reanimated' import RootSiblings from 'react-native-root-siblings' diff --git a/src/view/com/util/UserInfoText.tsx b/src/view/com/util/UserInfoText.tsx index 8a444d590..64aa37ff2 100644 --- a/src/view/com/util/UserInfoText.tsx +++ b/src/view/com/util/UserInfoText.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, StyleSheet, TextStyle} from 'react-native' import {AppBskyActorGetProfile as GetProfile} from '@atproto/api' diff --git a/src/view/com/util/error/ErrorMessage.tsx b/src/view/com/util/error/ErrorMessage.tsx index f0ef3a40f..c09d1b2e6 100644 --- a/src/view/com/util/error/ErrorMessage.tsx +++ b/src/view/com/util/error/ErrorMessage.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { StyleProp, StyleSheet, diff --git a/src/view/com/util/error/ErrorScreen.tsx b/src/view/com/util/error/ErrorScreen.tsx index 1b23141f3..b66f43789 100644 --- a/src/view/com/util/error/ErrorScreen.tsx +++ b/src/view/com/util/error/ErrorScreen.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import { FontAwesomeIcon, diff --git a/src/view/com/util/fab/FAB.web.tsx b/src/view/com/util/fab/FAB.web.tsx index 601d505a8..b9f3a0b07 100644 --- a/src/view/com/util/fab/FAB.web.tsx +++ b/src/view/com/util/fab/FAB.web.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' diff --git a/src/view/com/util/fab/FABInner.tsx b/src/view/com/util/fab/FABInner.tsx index 48e0005bc..77e283625 100644 --- a/src/view/com/util/fab/FABInner.tsx +++ b/src/view/com/util/fab/FABInner.tsx @@ -1,4 +1,4 @@ -import React, {ComponentProps} from 'react' +import {ComponentProps} from 'react' import {StyleSheet, TouchableWithoutFeedback} from 'react-native' import Animated from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' diff --git a/src/view/com/util/forms/DateInput.tsx b/src/view/com/util/forms/DateInput.tsx index 9df53f116..594bb48f6 100644 --- a/src/view/com/util/forms/DateInput.tsx +++ b/src/view/com/util/forms/DateInput.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react' +import {useCallback, useState} from 'react' import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native' import DatePicker from 'react-native-date-picker' import { diff --git a/src/view/com/util/forms/DateInput.web.tsx b/src/view/com/util/forms/DateInput.web.tsx index ea6102356..988d8aee6 100644 --- a/src/view/com/util/forms/DateInput.web.tsx +++ b/src/view/com/util/forms/DateInput.web.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useState} from 'react' +import {useCallback, useState} from 'react' import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native' // @ts-ignore types not available -prf import {unstable_createElement} from 'react-native-web' diff --git a/src/view/com/util/forms/RadioButton.tsx b/src/view/com/util/forms/RadioButton.tsx index e2bf3c9ac..7cf0f2d73 100644 --- a/src/view/com/util/forms/RadioButton.tsx +++ b/src/view/com/util/forms/RadioButton.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native' import {choose} from '#/lib/functions' diff --git a/src/view/com/util/forms/RadioGroup.tsx b/src/view/com/util/forms/RadioGroup.tsx index c6cf63930..e2a26dc49 100644 --- a/src/view/com/util/forms/RadioGroup.tsx +++ b/src/view/com/util/forms/RadioGroup.tsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react' +import {useState} from 'react' import {View} from 'react-native' import {s} from '#/lib/styles' diff --git a/src/view/com/util/forms/SelectableBtn.tsx b/src/view/com/util/forms/SelectableBtn.tsx index 1d74b935a..76161b433 100644 --- a/src/view/com/util/forms/SelectableBtn.tsx +++ b/src/view/com/util/forms/SelectableBtn.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Pressable, StyleProp, StyleSheet, ViewStyle} from 'react-native' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/util/forms/ToggleButton.tsx b/src/view/com/util/forms/ToggleButton.tsx index 706796fc4..31222aafe 100644 --- a/src/view/com/util/forms/ToggleButton.tsx +++ b/src/view/com/util/forms/ToggleButton.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native' import {choose} from '#/lib/functions' diff --git a/src/view/com/util/images/Image.tsx b/src/view/com/util/images/Image.tsx index e779fa378..94563ef9c 100644 --- a/src/view/com/util/images/Image.tsx +++ b/src/view/com/util/images/Image.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {Image, ImageProps, ImageSource} from 'expo-image' interface HighPriorityImageProps extends ImageProps { diff --git a/src/view/com/util/load-latest/LoadLatestBtn.tsx b/src/view/com/util/load-latest/LoadLatestBtn.tsx index 2310b1f27..d98aa0fa7 100644 --- a/src/view/com/util/load-latest/LoadLatestBtn.tsx +++ b/src/view/com/util/load-latest/LoadLatestBtn.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, TouchableOpacity, View} from 'react-native' import Animated from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' diff --git a/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx b/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx index 9b082cd95..e9615fe63 100644 --- a/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx +++ b/src/view/com/util/post-embeds/VideoEmbedInner/TimeIndicator.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleProp, ViewStyle} from 'react-native' import {View} from 'react-native' diff --git a/src/view/icons/Logomark.tsx b/src/view/icons/Logomark.tsx index 5715a1a40..b777992d4 100644 --- a/src/view/icons/Logomark.tsx +++ b/src/view/icons/Logomark.tsx @@ -1,4 +1,3 @@ -import React from 'react' import Svg, {Path, PathProps, SvgProps} from 'react-native-svg' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/icons/Logotype.tsx b/src/view/icons/Logotype.tsx index d6c35f6d9..8be4980e6 100644 --- a/src/view/icons/Logotype.tsx +++ b/src/view/icons/Logotype.tsx @@ -1,4 +1,3 @@ -import React from 'react' import Svg, {Path, PathProps, SvgProps} from 'react-native-svg' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/screens/Storybook/Admonitions.tsx b/src/view/screens/Storybook/Admonitions.tsx index ca97ebb23..988342f17 100644 --- a/src/view/screens/Storybook/Admonitions.tsx +++ b/src/view/screens/Storybook/Admonitions.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a} from '#/alf' diff --git a/src/view/screens/Storybook/Breakpoints.tsx b/src/view/screens/Storybook/Breakpoints.tsx index 5dd8a89fc..6c79e2c9e 100644 --- a/src/view/screens/Storybook/Breakpoints.tsx +++ b/src/view/screens/Storybook/Breakpoints.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useBreakpoints, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Icons.tsx b/src/view/screens/Storybook/Icons.tsx index 9de126d6b..97a588a5a 100644 --- a/src/view/screens/Storybook/Icons.tsx +++ b/src/view/screens/Storybook/Icons.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Links.tsx b/src/view/screens/Storybook/Links.tsx index 465ce0d6f..37e316401 100644 --- a/src/view/screens/Storybook/Links.tsx +++ b/src/view/screens/Storybook/Links.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Menus.tsx b/src/view/screens/Storybook/Menus.tsx index 3e5c74d86..28689b727 100644 --- a/src/view/screens/Storybook/Menus.tsx +++ b/src/view/screens/Storybook/Menus.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Palette.tsx b/src/view/screens/Storybook/Palette.tsx index 42000aa81..268ce5935 100644 --- a/src/view/screens/Storybook/Palette.tsx +++ b/src/view/screens/Storybook/Palette.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Settings.tsx b/src/view/screens/Storybook/Settings.tsx index 6bc293c73..fe47b2c74 100644 --- a/src/view/screens/Storybook/Settings.tsx +++ b/src/view/screens/Storybook/Settings.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import * as Toast from '#/view/com/util/Toast' diff --git a/src/view/screens/Storybook/Shadows.tsx b/src/view/screens/Storybook/Shadows.tsx index f92112395..e9c23f03e 100644 --- a/src/view/screens/Storybook/Shadows.tsx +++ b/src/view/screens/Storybook/Shadows.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Spacing.tsx b/src/view/screens/Storybook/Spacing.tsx index 9b97e92ad..94c62d2f9 100644 --- a/src/view/screens/Storybook/Spacing.tsx +++ b/src/view/screens/Storybook/Spacing.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Theming.tsx b/src/view/screens/Storybook/Theming.tsx index 5b6763370..673425b47 100644 --- a/src/view/screens/Storybook/Theming.tsx +++ b/src/view/screens/Storybook/Theming.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/screens/Storybook/Typography.tsx b/src/view/screens/Storybook/Typography.tsx index 03f86fd46..9286d4b3d 100644 --- a/src/view/screens/Storybook/Typography.tsx +++ b/src/view/screens/Storybook/Typography.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {View} from 'react-native' import {atoms as a} from '#/alf' diff --git a/src/view/shell/Composer.tsx b/src/view/shell/Composer.tsx index 4c357acc4..21ab9ec21 100644 --- a/src/view/shell/Composer.tsx +++ b/src/view/shell/Composer.tsx @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react' +import {useEffect} from 'react' import {Animated, Easing, StyleSheet, View} from 'react-native' import {useAnimatedValue} from '#/lib/hooks/useAnimatedValue' diff --git a/src/view/shell/desktop/Feeds.tsx b/src/view/shell/desktop/Feeds.tsx index bb6b8cadd..383d8f953 100644 --- a/src/view/shell/desktop/Feeds.tsx +++ b/src/view/shell/desktop/Feeds.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/shell/desktop/RightNav.tsx b/src/view/shell/desktop/RightNav.tsx index 5f75c220c..4f413211f 100644 --- a/src/view/shell/desktop/RightNav.tsx +++ b/src/view/shell/desktop/RightNav.tsx @@ -1,4 +1,3 @@ -import React from 'react' import {StyleSheet, View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -- cgit 1.4.1 From 3c33e42d3508bacc6c5944df1ff3a011644a6ddb Mon Sep 17 00:00:00 2001 From: Evan Date: Tue, 19 Nov 2024 19:07:27 +0000 Subject: Fix post interaction selectable text being cut off (#6527) --- src/components/dialogs/PostInteractionSettingsDialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/dialogs') diff --git a/src/components/dialogs/PostInteractionSettingsDialog.tsx b/src/components/dialogs/PostInteractionSettingsDialog.tsx index 0b8b386d3..81590e3c9 100644 --- a/src/components/dialogs/PostInteractionSettingsDialog.tsx +++ b/src/components/dialogs/PostInteractionSettingsDialog.tsx @@ -306,7 +306,7 @@ export function PostInteractionSettingsForm({ } value={quotesEnabled} onChange={onChangeQuotesEnabled} - style={[, a.justify_between, a.pt_xs]}> + style={[a.justify_between, a.pt_xs]}> {quotesEnabled ? ( Quote posts enabled @@ -483,7 +483,7 @@ function Selectable({ a.justify_between, a.rounded_sm, a.p_md, - {height: 40}, // for consistency with checkmark icon visible or not + {minHeight: 40}, // for consistency with checkmark icon visible or not t.atoms.bg_contrast_50, (hovered || focused) && t.atoms.bg_contrast_100, isSelected && { -- cgit 1.4.1 From 9663b3e855acfc5a4d3e61211eac253605147e93 Mon Sep 17 00:00:00 2001 From: Luke Lucas <52675277+O4FDev@users.noreply.github.com> Date: Sat, 23 Nov 2024 20:07:44 +0000 Subject: fix: nothing selected bug (#6260) * fix: nothing selected bug * fix: consolidate related logic for audience settings * simplify --------- Co-authored-by: Dan Abramov --- src/components/dialogs/PostInteractionSettingsDialog.tsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/components/dialogs') diff --git a/src/components/dialogs/PostInteractionSettingsDialog.tsx b/src/components/dialogs/PostInteractionSettingsDialog.tsx index 81590e3c9..8536001da 100644 --- a/src/components/dialogs/PostInteractionSettingsDialog.tsx +++ b/src/components/dialogs/PostInteractionSettingsDialog.tsx @@ -256,6 +256,9 @@ export function PostInteractionSettingsForm({ } else { newSelected.splice(i, 1) } + if (newSelected.length === 0) { + newSelected.push({type: 'everybody'}) + } onChangeThreadgateAllowUISettings(newSelected) } -- cgit 1.4.1