From 1db01a09a883885f643af47455ff338c8df08427 Mon Sep 17 00:00:00 2001 From: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:51:31 -0700 Subject: [PATCH] Create codemod for addressing ESLint warnings (#10032) --- .jscodeshift/react-import.js | 135 ++++++++++++++++ eslint.config.mjs | 1 + src/App.native.tsx | 10 +- src/Splash.tsx | 14 +- src/alf/index.tsx | 26 ++- src/alf/util/useColorModeTheme.ts | 4 +- src/alf/util/useGutters.ts | 4 +- src/components/AccountList.tsx | 6 +- src/components/AppLanguageDropdown.tsx | 4 +- src/components/Button.tsx | 148 +++++++++--------- src/components/ContextMenu/index.tsx | 13 +- src/components/Dialog/index.web.tsx | 25 +-- src/components/Dialog/utils.ts | 4 +- src/components/Fill.tsx | 1 - src/components/KnownFollowers.tsx | 10 +- src/components/LabelingServiceCard/index.tsx | 1 - src/components/LanguageSelect.tsx | 4 +- src/components/Layout/context.ts | 4 +- src/components/LikedByList.tsx | 10 +- src/components/LinearGradientBackground.tsx | 1 - src/components/Link.tsx | 8 +- src/components/ListCard.tsx | 6 +- src/components/Loader.tsx | 4 +- src/components/MediaInsetBorder.tsx | 1 - src/components/Menu/context.tsx | 10 +- src/components/Menu/types.ts | 1 - src/components/Pills.tsx | 8 +- .../Post/Embed/ExternalEmbed/ExternalGif.tsx | 14 +- .../Embed/ExternalEmbed/ExternalPlayer.tsx | 18 +-- .../Post/Embed/ExternalEmbed/index.tsx | 4 +- .../VideoEmbed/ActiveVideoWebContext.tsx | 8 +- .../Embed/VideoEmbed/VideoVolumeContext.tsx | 15 +- .../PostControls/BookmarkButton.tsx | 1 - src/components/ProfileHoverCard/index.web.tsx | 30 ++-- src/components/ProgressGuide/Toast.tsx | 23 ++- src/components/RichTextTag.tsx | 4 +- src/components/ScreenTransition.tsx | 1 - src/components/StarterPack/Main/FeedsList.tsx | 8 +- src/components/StarterPack/Main/PostsList.tsx | 6 +- .../StarterPack/Main/ProfilesList.tsx | 8 +- .../StarterPack/StarterPackCard.tsx | 6 +- src/components/Toast/index.tsx | 4 +- src/components/Toast/index.web.tsx | 4 +- src/components/TrendingTopics.tsx | 4 +- .../ageAssurance/AgeAssuranceAppealDialog.tsx | 4 +- src/components/anim/AnimatedCheck.tsx | 129 ++++++++------- src/components/dialogs/BirthDateSettings.tsx | 10 +- src/components/dialogs/MutedWords.tsx | 16 +- src/components/dialogs/Signin.tsx | 6 +- src/components/dms/AfterReportDialog.tsx | 1 - src/components/dms/BlockedByListDialog.tsx | 9 +- src/components/dms/ChatEmptyPill.tsx | 12 +- src/components/dms/ConvoMenu.tsx | 6 +- src/components/dms/DateDivider.tsx | 4 +- src/components/dms/MessageContext.tsx | 6 +- src/components/dms/MessageItem.tsx | 6 +- src/components/dms/MessageItemEmbed.tsx | 7 +- src/components/dms/MessageProfileButton.tsx | 4 +- .../dms/MessagesListBlockedFooter.tsx | 6 +- src/components/dms/NewMessagesPill.tsx | 8 +- src/components/forms/DateField/index.web.tsx | 6 +- src/components/forms/HostingProvider.tsx | 4 +- src/components/forms/InputGroup.tsx | 12 +- src/components/hooks/useDelayedLoading.ts | 6 +- src/components/hooks/useFollowMethods.ts | 6 +- src/components/hooks/useInteractionState.ts | 10 +- src/components/hooks/useRichText.ts | 10 +- .../hooks/useStarterPackEntry.native.ts | 6 +- src/components/hooks/useStarterPackEntry.ts | 6 +- src/components/icons/TEMPLATE.tsx | 10 +- src/components/icons/VerifiedCheck.tsx | 4 +- src/components/icons/VerifierCheck.tsx | 4 +- src/components/intents/IntentDialogs.tsx | 10 +- src/components/interstitials/Trending.tsx | 4 +- src/components/moderation/Hider.tsx | 8 +- .../moderation/LabelsOnMeDialog.tsx | 10 +- .../moderation/ReportDialog/index.tsx | 36 +++-- src/components/moderation/ScreenHider.tsx | 4 +- src/lib/currency.ts | 4 +- src/lib/custom-animations/CountWheel.tsx | 10 +- src/lib/custom-animations/CountWheel.web.tsx | 12 +- .../custom-animations/GestureActionView.tsx | 14 +- .../GestureActionView.web.tsx | 2 - src/lib/custom-animations/LikeIcon.web.tsx | 12 +- src/lib/haptics.ts | 4 +- src/lib/hooks/useIntentHandler.ts | 8 +- src/lib/hooks/useOTAUpdates.ts | 20 +-- src/lib/moderation.ts | 4 +- .../useModerationCauseDescription.ts | 4 +- src/locale/i18nProvider.tsx | 1 - src/screens/Deactivated.tsx | 14 +- .../E2E/SharedPreferencesTesterScreen.tsx | 4 +- src/screens/Hashtag.tsx | 30 ++-- src/screens/Home/NoFeedsPinned.tsx | 4 +- src/screens/List/ListHiddenScreen.tsx | 4 +- src/screens/Login/ForgotPasswordForm.tsx | 4 +- src/screens/Login/FormContainer.tsx | 1 - src/screens/Messages/Conversation.tsx | 8 +- .../Messages/components/ChatListItem.tsx | 6 +- .../Messages/components/MessageInput.web.tsx | 31 ++-- .../Messages/components/MessageListError.tsx | 4 +- .../ModerationInteractionSettings/index.tsx | 16 +- .../StepInterests/InterestButton.tsx | 4 +- .../Onboarding/StepInterests/index.tsx | 8 +- .../Onboarding/StepProfile/AvatarCircle.tsx | 4 +- .../StepProfile/AvatarCreatorCircle.tsx | 4 +- .../StepProfile/AvatarCreatorItems.tsx | 6 +- .../StepProfile/PlaceholderCanvas.tsx | 23 ++- src/screens/Onboarding/StepProfile/index.tsx | 34 ++-- src/screens/Post/PostLikedBy.tsx | 4 +- src/screens/Post/PostQuotes.tsx | 4 +- src/screens/Post/PostRepostedBy.tsx | 4 +- .../ThreadItemAnchorFollowButton.tsx | 10 +- src/screens/Profile/ErrorState.tsx | 4 +- src/screens/Profile/Header/GrowableAvatar.tsx | 1 - src/screens/Profile/Header/GrowableBanner.tsx | 1 - src/screens/Profile/KnownFollowers.tsx | 12 +- src/screens/Profile/ProfileFollowers.tsx | 4 +- src/screens/Profile/ProfileFollows.tsx | 4 +- src/screens/Profile/ProfileLabelerLikedBy.tsx | 4 +- .../Profile/components/ProfileFeedHeader.tsx | 10 +- .../Search/components/StarterPackCard.tsx | 4 +- .../components/DeactivateAccountDialog.tsx | 8 +- .../Settings/components/Email2FAToggle.tsx | 4 +- src/screens/Settings/components/PwiOptOut.tsx | 4 +- .../Signup/StepCaptcha/CaptchaWebView.web.tsx | 6 +- src/screens/Signup/StepCaptcha/index.tsx | 14 +- src/screens/Signup/StepInfo/index.tsx | 8 +- src/screens/Signup/state.ts | 6 +- src/screens/SignupQueued.tsx | 12 +- .../StarterPack/StarterPackLandingScreen.tsx | 7 +- src/screens/StarterPack/StarterPackScreen.tsx | 18 +-- src/screens/StarterPack/Wizard/State.tsx | 8 +- src/screens/StarterPack/Wizard/index.tsx | 6 +- src/screens/Topic.tsx | 22 +-- src/state/a11y.tsx | 14 +- src/state/cache/thread-mutes.tsx | 24 +-- src/state/dialogs/index.tsx | 35 +++-- src/state/home-badge.tsx | 12 +- src/state/lightbox.tsx | 18 +-- src/state/messages/convo/index.tsx | 15 +- src/state/messages/current-convo-id.tsx | 12 +- src/state/messages/events/index.tsx | 14 +- src/state/messages/index.tsx | 2 - src/state/messages/message-drafts.tsx | 13 +- src/state/modals/index.tsx | 16 +- src/state/preferences/alt-text-required.tsx | 24 +-- src/state/preferences/autoplay.tsx | 24 +-- src/state/preferences/disable-haptics.tsx | 24 +-- .../preferences/external-embeds-prefs.tsx | 22 ++- src/state/preferences/hidden-posts.tsx | 27 ++-- src/state/preferences/in-app-browser.tsx | 22 ++- src/state/preferences/index.tsx | 2 - src/state/preferences/kawaii.tsx | 22 +-- src/state/preferences/label-defs.tsx | 6 +- src/state/preferences/languages.tsx | 25 +-- src/state/preferences/large-alt-badge.tsx | 24 +-- src/state/preferences/subtitles.tsx | 24 +-- src/state/preferences/trending.tsx | 27 ++-- src/state/preferences/used-starter-packs.tsx | 14 +- src/state/queries/actor-autocomplete.ts | 6 +- src/state/queries/handle.ts | 6 +- src/state/queries/notifications/unread.tsx | 31 ++-- src/state/queries/post-feed.ts | 4 +- src/state/queries/postgate/index.ts | 4 +- src/state/queries/preferences/moderation.ts | 6 +- src/state/queries/search-posts.ts | 8 +- .../queries/trending/useGetTrendsQuery.ts | 6 +- src/state/shell/color-mode.tsx | 24 ++- src/state/shell/composer/index.tsx | 20 +-- .../composer/useComposerKeyboardShortcut.tsx | 4 +- src/state/shell/drawer-swipe-disabled.tsx | 12 +- src/state/shell/logged-out.tsx | 14 +- src/state/shell/minimal-mode.tsx | 14 +- src/state/shell/onboarding.tsx | 14 +- src/state/shell/post-progress.tsx | 6 +- src/state/shell/progress-guide.tsx | 24 +-- src/state/shell/shell-layout.tsx | 8 +- src/state/shell/starter-pack.tsx | 12 +- src/state/shell/tick-every-minute.tsx | 10 +- src/state/threadgate-hidden-replies.tsx | 26 +-- src/state/userActionHistory.ts | 4 +- src/view/com/auth/SplashScreen.web.tsx | 6 +- .../com/composer/AltTextCounterWrapper.tsx | 1 - src/view/com/composer/Composer.tsx | 32 ++-- src/view/com/composer/KeyboardAccessory.tsx | 1 - src/view/com/composer/photos/Gallery.tsx | 65 ++++---- .../text-input/web/EmojiPicker.web.tsx | 8 +- .../text-input/web/useWebPreloadEmoji.ts | 4 +- .../composer/videos/SubtitleFilePicker.tsx | 1 - src/view/com/home/HomeHeader.tsx | 10 +- src/view/com/home/HomeHeaderLayout.web.tsx | 1 - .../ImageItem/ImageItem.android.tsx | 4 +- .../components/ImageItem/ImageItem.ios.tsx | 4 +- .../components/ImageItem/ImageItem.tsx | 4 +- src/view/com/lightbox/ImageViewing/index.tsx | 14 +- src/view/com/lists/ListMembers.tsx | 16 +- src/view/com/lists/MyLists.tsx | 10 +- src/view/com/modals/UserAddRemoveLists.tsx | 8 +- .../com/notifications/NotificationFeed.tsx | 18 +-- src/view/com/pager/PagerHeaderContext.tsx | 6 +- src/view/com/posts/CustomFeedEmptyState.tsx | 6 +- src/view/com/posts/FeedShutdownMsg.tsx | 6 +- src/view/com/posts/FollowingEmptyState.tsx | 6 +- src/view/com/posts/FollowingEndOfFeed.tsx | 6 +- src/view/com/posts/PostFeedErrorMessage.tsx | 14 +- src/view/com/posts/ViewFullThread.tsx | 4 +- src/view/com/profile/ProfileFollowers.tsx | 24 +-- src/view/com/profile/ProfileFollows.tsx | 26 +-- src/view/com/profile/ProfileMenu.tsx | 28 ++-- src/view/com/profile/ProfileSubpageHeader.tsx | 6 +- .../com/util/BottomSheetCustomBackdrop.tsx | 1 - src/view/com/util/EmptyState.tsx | 6 +- src/view/com/util/MainScrollProvider.tsx | 4 +- src/view/com/util/ViewSelector.tsx | 28 ++-- src/view/com/util/Views.web.tsx | 8 +- src/view/com/util/WebAuxClickWrapper.tsx | 1 - src/view/com/util/forms/Button.tsx | 10 +- src/view/com/util/layouts/LoggedOutLayout.tsx | 1 - src/view/com/util/text/Text.tsx | 4 +- src/view/icons/Logo.tsx | 4 +- src/view/screens/CommunityGuidelines.tsx | 4 +- src/view/screens/CopyrightPolicy.tsx | 4 +- src/view/screens/Debug.tsx | 8 +- src/view/screens/DebugMod.tsx | 34 ++-- src/view/screens/Feeds.tsx | 30 ++-- src/view/screens/Home.tsx | 30 ++-- src/view/screens/NotFound.tsx | 6 +- src/view/screens/PrivacyPolicy.tsx | 4 +- src/view/screens/Storybook/Dialogs.tsx | 10 +- src/view/screens/Storybook/Forms.tsx | 24 +-- src/view/screens/Storybook/ListContained.tsx | 8 +- src/view/screens/Storybook/Storybook.tsx | 4 +- src/view/screens/Support.tsx | 4 +- src/view/screens/TermsOfService.tsx | 4 +- src/view/shell/Composer.ios.tsx | 6 +- src/view/shell/Composer.web.tsx | 23 ++- src/view/shell/Drawer.tsx | 53 +++---- src/view/shell/NavSignupCard.tsx | 8 +- src/view/shell/bottom-bar/BottomBarWeb.tsx | 8 +- 240 files changed, 1560 insertions(+), 1347 deletions(-) create mode 100644 .jscodeshift/react-import.js diff --git a/.jscodeshift/react-import.js b/.jscodeshift/react-import.js new file mode 100644 index 0000000000..e63238f862 --- /dev/null +++ b/.jscodeshift/react-import.js @@ -0,0 +1,135 @@ +/** + * Codemod to replace namespaced React calls with named imports + * + * Before: + * import React from 'react' + * React.useEffect(() => {}, []) + * + * After: + * import { useEffect } from 'react' + * useEffect(() => {}, []) + * + * Usage: jscodeshift -t .jscodeshift/react-import.js + * Example: jscodeshift -t .jscodeshift/react-import.js src/App.native.tsx + */ + +/* eslint-disable */ + +export const parser = 'tsx' + +export default function transformer(file, api) { + const j = api.jscodeshift + const root = j(file.source) + + // Find the React import + let reactImportPath = null + const reactMembers = new Set() + + root.find(j.ImportDeclaration).forEach(path => { + const node = path.value + if (node.source.value === 'react') { + node.specifiers.forEach(spec => { + // Check if this is a default import of React + if ( + spec.type === 'ImportDefaultSpecifier' && + spec.local.name === 'React' + ) { + reactImportPath = path + } + }) + } + }) + + if (!reactImportPath) { + // No React import found, nothing to do + return file.source + } + + // Find all React.* member expressions + root + .find(j.MemberExpression) + .filter(path => { + const node = path.value + return ( + node.object.type === 'Identifier' && + node.object.name === 'React' && + node.property.type === 'Identifier' + ) + }) + .forEach(path => { + const propertyName = path.value.property.name + reactMembers.add(propertyName) + }) + + // Find all React.* JSX member expressions (e.g., ) + root + .find(j.JSXMemberExpression) + .filter(path => { + const node = path.value + return node.object.name === 'React' && node.property.name + }) + .forEach(path => { + const propertyName = path.value.property.name + reactMembers.add(propertyName) + }) + + // If no React members are used, remove the import + if (reactMembers.size === 0) { + reactImportPath.prune() + return root.toSource() + } + + // Sort the members for consistent output + const sortedMembers = Array.from(reactMembers).sort() + + // Create new import specifiers + const newSpecifiers = sortedMembers.map(name => + j.importSpecifier(j.identifier(name), j.identifier(name)), + ) + + // Get the existing import specifiers + const sortedImports = Array.from(reactImportPath.value.specifiers).sort() + const existingSpecifiers = sortedImports.filter( + specifier => specifier.type !== 'ImportDefaultSpecifier', + ) + + const allSpecifiers = [ + ...new Map( + [...existingSpecifiers, ...newSpecifiers].map(item => [ + item.imported.name, + item, + ]), + ).values(), + ] + + // Update the import declaration + reactImportPath.value.specifiers = allSpecifiers + + // Replace all React.* member expressions with just the identifier + root + .find(j.MemberExpression) + .filter(path => { + const node = path.value + return ( + node.object.type === 'Identifier' && + node.object.name === 'React' && + node.property.type === 'Identifier' + ) + }) + .replaceWith(path => { + return j.identifier(path.value.property.name) + }) + + // Replace all React.* JSX member expressions with just the identifier + root + .find(j.JSXMemberExpression) + .filter(path => { + const node = path.value + return node.object.name === 'React' && node.property.name + }) + .replaceWith(path => { + return j.jsxIdentifier(path.value.property.name) + }) + + return root.toSource() +} diff --git a/eslint.config.mjs b/eslint.config.mjs index 18f112f0b6..21cdd850a5 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -37,6 +37,7 @@ export default defineConfig( '*.e2e.ts', '*.e2e.tsx', 'eslint.config.mjs', + '.jscodeshift/**', ], }, diff --git a/src/App.native.tsx b/src/App.native.tsx index aa6e9bd06b..3699cb173d 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -1,7 +1,7 @@ import '#/logger/sentry/setup' import '#/view/icons' -import React, {useEffect, useState} from 'react' +import {Fragment, useEffect, useState} from 'react' import {GestureHandlerRootView} from 'react-native-gesture-handler' import {KeyboardProvider as KeyboardControllerProvider} from 'react-native-keyboard-controller' import { @@ -111,7 +111,7 @@ prefetchLiveEvents() prefetchAppConfig() function InnerApp() { - const [isReady, setIsReady] = React.useState(false) + const [isReady, setIsReady] = useState(false) const {currentAccount} = useSession() const {resumeSession} = useSessionApi() const theme = useColorModeTheme() @@ -152,7 +152,7 @@ function InnerApp() { - @@ -208,7 +208,7 @@ function InnerApp() { - + @@ -220,7 +220,7 @@ function InnerApp() { function App() { const [isReady, setReady] = useState(false) - React.useEffect(() => { + useEffect(() => { Promise.all([initPersistedState(), Geo.resolve(), setupDeviceId]).then(() => setReady(true), ) diff --git a/src/Splash.tsx b/src/Splash.tsx index 5d46ba617e..b453cb4292 100644 --- a/src/Splash.tsx +++ b/src/Splash.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect} from 'react' +import {forwardRef, useCallback, useEffect, useState} from 'react' import { AccessibilityInfo, Image as RNImage, @@ -29,7 +29,7 @@ const darkSplashImageUri = RNImage.resolveAssetSource( darkSplashImagePointer, ).uri -export const Logo = React.forwardRef(function LogoImpl(props: SvgProps, ref) { +export const Logo = forwardRef(function LogoImpl(props: SvgProps, ref) { const width = 1000 const height = width * (67 / 64) return ( @@ -58,12 +58,10 @@ export function Splash(props: React.PropsWithChildren) { const outroLogo = useSharedValue(0) const outroApp = useSharedValue(0) const outroAppOpacity = useSharedValue(0) - const [isAnimationComplete, setIsAnimationComplete] = React.useState(false) - const [isImageLoaded, setIsImageLoaded] = React.useState(false) - const [isLayoutReady, setIsLayoutReady] = React.useState(false) - const [reduceMotion, setReduceMotion] = React.useState( - false, - ) + const [isAnimationComplete, setIsAnimationComplete] = useState(false) + const [isImageLoaded, setIsImageLoaded] = useState(false) + const [isLayoutReady, setIsLayoutReady] = useState(false) + const [reduceMotion, setReduceMotion] = useState(false) const isReady = props.isReady && isImageLoaded && diff --git a/src/alf/index.tsx b/src/alf/index.tsx index 3aff9ddb57..1c7b080d87 100644 --- a/src/alf/index.tsx +++ b/src/alf/index.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import {createContext, useCallback, useContext, useMemo, useState} from 'react' import {type Theme, type ThemeName} from '@bsky.app/alf' import { @@ -46,7 +46,7 @@ export type Alf = { /* * Context */ -export const Context = React.createContext({ +export const Context = createContext({ themeName: 'light', theme: themes.light, themes, @@ -65,15 +65,13 @@ export function ThemeProvider({ children, theme: themeName, }: React.PropsWithChildren<{theme: ThemeName}>) { - const [fontScale, setFontScale] = React.useState(() => + const [fontScale, setFontScale] = useState(() => getFontScale(), ) - const [fontScaleMultiplier, setFontScaleMultiplier] = React.useState(() => + const [fontScaleMultiplier, setFontScaleMultiplier] = useState(() => computeFontScaleMultiplier(fontScale), ) - const setFontScaleAndPersist = React.useCallback< - Alf['fonts']['setFontScale'] - >( + const setFontScaleAndPersist = useCallback( fs => { setFontScale(fs) persistFontScale(fs) @@ -81,12 +79,10 @@ export function ThemeProvider({ }, [setFontScale], ) - const [fontFamily, setFontFamily] = React.useState( - () => getFontFamily(), + const [fontFamily, setFontFamily] = useState(() => + getFontFamily(), ) - const setFontFamilyAndPersist = React.useCallback< - Alf['fonts']['setFontFamily'] - >( + const setFontFamilyAndPersist = useCallback( ff => { setFontFamily(ff) persistFontFamily(ff) @@ -94,7 +90,7 @@ export function ThemeProvider({ [setFontFamily], ) - const value = React.useMemo( + const value = useMemo( () => ({ themes, themeName: themeName, @@ -122,12 +118,12 @@ export function ThemeProvider({ } export function useAlf() { - return React.useContext(Context) + return useContext(Context) } export function useTheme(theme?: ThemeName) { const alf = useAlf() - return React.useMemo(() => { + return useMemo(() => { return theme ? alf.themes[theme] : alf.theme }, [theme, alf]) } diff --git a/src/alf/util/useColorModeTheme.ts b/src/alf/util/useColorModeTheme.ts index 836aac3073..7cb9b12723 100644 --- a/src/alf/util/useColorModeTheme.ts +++ b/src/alf/util/useColorModeTheme.ts @@ -1,4 +1,4 @@ -import React from 'react' +import {useLayoutEffect} from 'react' import {type ColorSchemeName, useColorScheme} from 'react-native' import {type ThemeName} from '@bsky.app/alf' @@ -9,7 +9,7 @@ import {IS_WEB} from '#/env' export function useColorModeTheme(): ThemeName { const theme = useThemeName() - React.useLayoutEffect(() => { + useLayoutEffect(() => { updateDocument(theme) }, [theme]) diff --git a/src/alf/util/useGutters.ts b/src/alf/util/useGutters.ts index 265d0f23c2..f7dcef51bd 100644 --- a/src/alf/util/useGutters.ts +++ b/src/alf/util/useGutters.ts @@ -1,4 +1,4 @@ -import React from 'react' +import {useMemo} from 'react' import {type Breakpoint, useBreakpoints} from '#/alf/breakpoints' import * as tokens from '#/alf/tokens' @@ -52,7 +52,7 @@ export function useGutters([top, right, bottom, left]: Gutter[]) { bottom = top left = right } - return React.useMemo(() => { + return useMemo(() => { return { paddingTop: top === 0 ? 0 : gutters[top][activeBreakpoint || 'default'], paddingRight: diff --git a/src/components/AccountList.tsx b/src/components/AccountList.tsx index 4a43bf283c..a65eeb0722 100644 --- a/src/components/AccountList.tsx +++ b/src/components/AccountList.tsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import {Fragment, useCallback} from 'react' import {View} from 'react-native' import {type AppBskyActorDefs} from '@atproto/api' import {msg} from '@lingui/core/macro' @@ -52,7 +52,7 @@ export function AccountList({ t.atoms.border_contrast_low, ]}> {accounts.map(account => ( - + p.did === account.did)} account={account} @@ -61,7 +61,7 @@ export function AccountList({ isPendingAccount={account.did === pendingDid} /> - + ))}