From 66ad4f0d51569ee5794acfa6b1160cb08b77c56b Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 20 Feb 2026 12:32:54 +0200 Subject: [PATCH] move ErrorScreen to #/components dir --- src/{view/com/util/error => components}/ErrorScreen.tsx | 0 src/components/dialogs/GifSelect.tsx | 2 +- src/components/dialogs/LanguageSelectDialog.tsx | 2 +- src/screens/FindContactsFlowScreen.tsx | 2 +- src/screens/Profile/ProfileFeed/index.tsx | 2 +- src/screens/Settings/AppPasswords.tsx | 2 +- src/screens/Settings/FindContactsSettings.tsx | 2 +- src/screens/Settings/components/ChangeHandleDialog.tsx | 9 ++++++--- src/view/com/util/ErrorBoundary.tsx | 2 +- src/view/screens/Debug.tsx | 2 +- src/view/screens/ModerationBlockedAccounts.tsx | 2 +- src/view/screens/ModerationMutedAccounts.tsx | 2 +- src/view/screens/Profile.tsx | 2 +- 13 files changed, 17 insertions(+), 14 deletions(-) rename src/{view/com/util/error => components}/ErrorScreen.tsx (100%) diff --git a/src/view/com/util/error/ErrorScreen.tsx b/src/components/ErrorScreen.tsx similarity index 100% rename from src/view/com/util/error/ErrorScreen.tsx rename to src/components/ErrorScreen.tsx diff --git a/src/components/dialogs/GifSelect.tsx b/src/components/dialogs/GifSelect.tsx index 23fd2f38e6..06f003eb00 100644 --- a/src/components/dialogs/GifSelect.tsx +++ b/src/components/dialogs/GifSelect.tsx @@ -18,12 +18,12 @@ import { useFeaturedGifsQuery, useGifSearchQuery, } from '#/state/queries/tenor' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {ErrorBoundary} from '#/view/com/util/ErrorBoundary' import {type ListMethods} from '#/view/com/util/List' import {atoms as a, ios, native, useBreakpoints, useTheme, web} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' +import {ErrorScreen} from '#/components/ErrorScreen' import * as TextField from '#/components/forms/TextField' import {useThrottledValue} from '#/components/hooks/useThrottledValue' import {ArrowLeft_Stroke2_Corner0_Rounded as Arrow} from '#/components/icons/Arrow' diff --git a/src/components/dialogs/LanguageSelectDialog.tsx b/src/components/dialogs/LanguageSelectDialog.tsx index 567fd6608a..00fca51b95 100644 --- a/src/components/dialogs/LanguageSelectDialog.tsx +++ b/src/components/dialogs/LanguageSelectDialog.tsx @@ -7,11 +7,11 @@ import {useLingui} from '@lingui/react' import {languageName} from '#/locale/helpers' import {type Language, LANGUAGES, LANGUAGES_MAP_CODE2} from '#/locale/languages' import {useLanguagePrefs} from '#/state/preferences/languages' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {ErrorBoundary} from '#/view/com/util/ErrorBoundary' import {atoms as a, useTheme, web} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' +import {ErrorScreen} from '#/components/ErrorScreen' import {SearchInput} from '#/components/forms/SearchInput' import * as Toggle from '#/components/forms/Toggle' import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times' diff --git a/src/screens/FindContactsFlowScreen.tsx b/src/screens/FindContactsFlowScreen.tsx index 9b9e5b6c74..7d5e52cfda 100644 --- a/src/screens/FindContactsFlowScreen.tsx +++ b/src/screens/FindContactsFlowScreen.tsx @@ -9,9 +9,9 @@ import { type NativeStackScreenProps, } from '#/lib/routes/types' import {useSetMinimalShellMode} from '#/state/shell' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {FindContactsFlow} from '#/components/contacts/FindContactsFlow' import {useFindContactsFlowState} from '#/components/contacts/state' +import {ErrorScreen} from '#/components/ErrorScreen' import * as Layout from '#/components/Layout' import {ScreenTransition} from '#/components/ScreenTransition' import {IS_NATIVE} from '#/env' diff --git a/src/screens/Profile/ProfileFeed/index.tsx b/src/screens/Profile/ProfileFeed/index.tsx index 8c0147d081..3a45aaf933 100644 --- a/src/screens/Profile/ProfileFeed/index.tsx +++ b/src/screens/Profile/ProfileFeed/index.tsx @@ -31,7 +31,6 @@ import {truncateAndInvalidate} from '#/state/queries/util' import {useSession} from '#/state/session' import {PostFeed} from '#/view/com/posts/PostFeed' import {EmptyState} from '#/view/com/util/EmptyState' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {FAB} from '#/view/com/util/fab/FAB' import {type ListRef} from '#/view/com/util/List' import {LoadLatestBtn} from '#/view/com/util/load-latest/LoadLatestBtn' @@ -40,6 +39,7 @@ import { ProfileFeedHeader, ProfileFeedHeaderSkeleton, } from '#/screens/Profile/components/ProfileFeedHeader' +import {ErrorScreen} from '#/components/ErrorScreen' import {HashtagWide_Stroke1_Corner0_Rounded as HashtagWideIcon} from '#/components/icons/Hashtag' import * as Layout from '#/components/Layout' import {IS_NATIVE} from '#/env' diff --git a/src/screens/Settings/AppPasswords.tsx b/src/screens/Settings/AppPasswords.tsx index 0ad67b250e..7e2945210d 100644 --- a/src/screens/Settings/AppPasswords.tsx +++ b/src/screens/Settings/AppPasswords.tsx @@ -18,12 +18,12 @@ import { useAppPasswordsQuery, } from '#/state/queries/app-passwords' import {EmptyState} from '#/view/com/util/EmptyState' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import * as Toast from '#/view/com/util/Toast' import {atoms as a, useTheme} from '#/alf' import {Admonition} from '#/components/Admonition' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {useDialogControl} from '#/components/Dialog' +import {ErrorScreen} from '#/components/ErrorScreen' import {Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth' import {PlusLarge_Stroke2_Corner0_Rounded as PlusIcon} from '#/components/icons/Plus' import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash' diff --git a/src/screens/Settings/FindContactsSettings.tsx b/src/screens/Settings/FindContactsSettings.tsx index 461a28ffbc..e1a9d912d8 100644 --- a/src/screens/Settings/FindContactsSettings.tsx +++ b/src/screens/Settings/FindContactsSettings.tsx @@ -32,12 +32,12 @@ import { useContactsSyncStatusQuery, } from '#/state/queries/find-contacts' import {useAgent, useSession} from '#/state/session' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {List} from '#/view/com/util/List' import {atoms as a, tokens, useGutters, useTheme} from '#/alf' import {Admonition} from '#/components/Admonition' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import {ContactsHeroImage} from '#/components/contacts/components/HeroImage' +import {ErrorScreen} from '#/components/ErrorScreen' import {ArrowRotateClockwise_Stroke2_Corner0_Rounded as ResyncIcon} from '#/components/icons/ArrowRotate' import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times' import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash' diff --git a/src/screens/Settings/components/ChangeHandleDialog.tsx b/src/screens/Settings/components/ChangeHandleDialog.tsx index accbf41c86..932531df01 100644 --- a/src/screens/Settings/components/ChangeHandleDialog.tsx +++ b/src/screens/Settings/components/ChangeHandleDialog.tsx @@ -17,18 +17,21 @@ import {useMutation, useQueryClient} from '@tanstack/react-query' import {HITSLOP_10, urls} from '#/lib/constants' import {cleanError} from '#/lib/strings/errors' -import {createFullHandle, validateServiceHandle} from '#/lib/strings/handles' -import {sanitizeHandle} from '#/lib/strings/handles' +import { + createFullHandle, + sanitizeHandle, + validateServiceHandle, +} from '#/lib/strings/handles' import {useFetchDid, useUpdateHandleMutation} from '#/state/queries/handle' import {RQKEY as RQKEY_PROFILE} from '#/state/queries/profile' import {useServiceQuery} from '#/state/queries/service' import {useCurrentAccountProfile} from '#/state/queries/useCurrentAccountProfile' import {useAgent, useSession} from '#/state/session' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {atoms as a, native, useBreakpoints, useTheme} from '#/alf' import {Admonition} from '#/components/Admonition' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' +import {ErrorScreen} from '#/components/ErrorScreen' import * as SegmentedControl from '#/components/forms/SegmentedControl' import * as TextField from '#/components/forms/TextField' import { diff --git a/src/view/com/util/ErrorBoundary.tsx b/src/view/com/util/ErrorBoundary.tsx index 8acc0b97a9..78d6bd0d7b 100644 --- a/src/view/com/util/ErrorBoundary.tsx +++ b/src/view/com/util/ErrorBoundary.tsx @@ -6,8 +6,8 @@ import {useLingui} from '@lingui/react' import {cleanError} from '#/lib/strings/errors' import {logger} from '#/logger' +import {ErrorScreen} from '#/components/ErrorScreen' import {IS_WEB} from '#/env' -import {ErrorScreen} from './error/ErrorScreen' interface Props { children?: ReactNode diff --git a/src/view/screens/Debug.tsx b/src/view/screens/Debug.tsx index 1df7b5c1f5..7d2f0b6e0c 100644 --- a/src/view/screens/Debug.tsx +++ b/src/view/screens/Debug.tsx @@ -12,13 +12,13 @@ import {s} from '#/lib/styles' import {type PaletteColorName, ThemeProvider} from '#/lib/ThemeContext' import {EmptyState} from '#/view/com/util/EmptyState' import {ErrorMessage} from '#/view/com/util/error/ErrorMessage' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {Button} from '#/view/com/util/forms/Button' import * as LoadingPlaceholder from '#/view/com/util/LoadingPlaceholder' import {Text} from '#/view/com/util/text/Text' import * as Toast from '#/view/com/util/Toast' import {ViewHeader} from '#/view/com/util/ViewHeader' import {ViewSelector} from '#/view/com/util/ViewSelector' +import {ErrorScreen} from '#/components/ErrorScreen' import {HashtagWide_Stroke1_Corner0_Rounded as HashtagWideIcon} from '#/components/icons/Hashtag' import * as Layout from '#/components/Layout' diff --git a/src/view/screens/ModerationBlockedAccounts.tsx b/src/view/screens/ModerationBlockedAccounts.tsx index bb94f8083c..6db8e5f131 100644 --- a/src/view/screens/ModerationBlockedAccounts.tsx +++ b/src/view/screens/ModerationBlockedAccounts.tsx @@ -11,9 +11,9 @@ import {logger} from '#/logger' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {useMyBlockedAccountsQuery} from '#/state/queries/my-blocked-accounts' import {useSetMinimalShellMode} from '#/state/shell' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {List} from '#/view/com/util/List' import {atoms as a, useTheme} from '#/alf' +import {ErrorScreen} from '#/components/ErrorScreen' import * as Layout from '#/components/Layout' import {ListFooter} from '#/components/Lists' import * as ProfileCard from '#/components/ProfileCard' diff --git a/src/view/screens/ModerationMutedAccounts.tsx b/src/view/screens/ModerationMutedAccounts.tsx index 891a379b61..174daf6b83 100644 --- a/src/view/screens/ModerationMutedAccounts.tsx +++ b/src/view/screens/ModerationMutedAccounts.tsx @@ -11,9 +11,9 @@ import {logger} from '#/logger' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {useMyMutedAccountsQuery} from '#/state/queries/my-muted-accounts' import {useSetMinimalShellMode} from '#/state/shell' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {List} from '#/view/com/util/List' import {atoms as a, useTheme} from '#/alf' +import {ErrorScreen} from '#/components/ErrorScreen' import * as Layout from '#/components/Layout' import {ListFooter} from '#/components/Lists' import * as ProfileCard from '#/components/ProfileCard' diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index dd1450c1c8..4ef3a77cf2 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -37,13 +37,13 @@ import {useSetMinimalShellMode} from '#/state/shell' import {ProfileFeedgens} from '#/view/com/feeds/ProfileFeedgens' import {ProfileLists} from '#/view/com/lists/ProfileLists' import {PagerWithHeader} from '#/view/com/pager/PagerWithHeader' -import {ErrorScreen} from '#/view/com/util/error/ErrorScreen' import {FAB} from '#/view/com/util/fab/FAB' import {type ListRef} from '#/view/com/util/List' import {ProfileHeader, ProfileHeaderLoading} from '#/screens/Profile/Header' import {ProfileFeedSection} from '#/screens/Profile/Sections/Feed' import {ProfileLabelsSection} from '#/screens/Profile/Sections/Labels' import {atoms as a} from '#/alf' +import {ErrorScreen} from '#/components/ErrorScreen' import {Circle_And_Square_Stroke1_Corner0_Rounded_Filled as CircleAndSquareIcon} from '#/components/icons/CircleAndSquare' import {Heart2_Stroke1_Corner0_Rounded as HeartIcon} from '#/components/icons/Heart2' import {Image_Stroke1_Corner0_Rounded as ImageIcon} from '#/components/icons/Image'