π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Update Space load error fallback
Anand Baburajancaa88877a854
diff --git a/web/apps/space/src/components/SpaceRouteFallback.tsx b/web/apps/space/src/components/SpaceRouteFallback.tsxindex 27b0d6f6cd..d17787274f 100644--- a/web/apps/space/src/components/SpaceRouteFallback.tsx+++ b/web/apps/space/src/components/SpaceRouteFallback.tsx@@ -3,10 +3,8 @@ import { SpacePageMeta } from "components/SpacePageMeta";import React from "react";interface SpaceRouteFallbackProps {- actionLabel?: string;background: string;message?: string;- onAction?: () => void;}interface SpaceLoadingSpinnerProps {@@ -35,10 +33,8 @@ export const SpaceLoadingSpinner: React.FC<SpaceLoadingSpinnerProps> = ({);export const SpaceRouteFallback: React.FC<SpaceRouteFallbackProps> = ({- actionLabel,background,message,- onAction,}) => (<><SpacePageMeta themeColor={background} />@@ -67,30 +63,6 @@ export const SpaceRouteFallback: React.FC<SpaceRouteFallbackProps> = ({>{message}</Box>- {actionLabel && onAction && (- <Box- component="button"- type="button"- onClick={onAction}- sx={{- bgcolor: "#08C225",- border: 0,- borderRadius: "18px",- color: "white",- cursor: "pointer",- fontFamily:- '"Inter Variable", Inter, sans-serif',- fontSize: 13,- fontWeight: 700,- height: 36,- lineHeight: "18px",- mt: 2,- px: "16px",- }}- >- {actionLabel}- </Box>- )}</Box>) : (<SpaceLoadingSpinner />diff --git a/web/apps/space/src/pages/app/friends/[spaceId].tsx b/web/apps/space/src/pages/app/friends/[spaceId].tsxindex 2f720ed0f6..e571b4736e 100644--- a/web/apps/space/src/pages/app/friends/[spaceId].tsx+++ b/web/apps/space/src/pages/app/friends/[spaceId].tsx@@ -34,7 +34,6 @@ const Page: React.FC = () => {profile,profileLoadError,profileLoadStatus,- refreshProfile,setFriends,} = useSpaceAppState();const friendSpaceId =@@ -108,10 +107,8 @@ const Page: React.FC = () => {) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={friendsBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/app/friends/index.tsx b/web/apps/space/src/pages/app/friends/index.tsxindex 0c388f141e..d6ef3694e8 100644--- a/web/apps/space/src/pages/app/friends/index.tsx+++ b/web/apps/space/src/pages/app/friends/index.tsx@@ -17,7 +17,6 @@ const Page: React.FC = () => {profile,profileLoadError,profileLoadStatus,- refreshProfile,setFriends,} = useSpaceAppState();@@ -40,10 +39,8 @@ const Page: React.FC = () => {if (profileLoadStatus != "ready" || !profile) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={friendsBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/app/index.tsx b/web/apps/space/src/pages/app/index.tsxindex 7d78d7b265..1249b30ae5 100644--- a/web/apps/space/src/pages/app/index.tsx+++ b/web/apps/space/src/pages/app/index.tsx@@ -28,7 +28,6 @@ const Page: React.FC = () => {profile,profileLoadError,profileLoadStatus,- refreshProfile,setFriends,} = useSpaceAppState();const [addedFriendToastName, setAddedFriendToastName] = useState<string>();@@ -102,10 +101,8 @@ const Page: React.FC = () => {if (profileLoadStatus != "ready" || !profile) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={homeBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/app/notifications.tsx b/web/apps/space/src/pages/app/notifications.tsxindex 9c472a9286..ef41ead136 100644--- a/web/apps/space/src/pages/app/notifications.tsx+++ b/web/apps/space/src/pages/app/notifications.tsx@@ -25,7 +25,6 @@ const Page: React.FC = () => {profile,profileLoadError,profileLoadStatus,- refreshProfile,setFriends,} = useSpaceAppState();const [conversations, setConversations] = React.useState<@@ -170,10 +169,8 @@ const Page: React.FC = () => {if (profileLoadStatus != "ready" || !profile) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={messagesBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/app/profile.tsx b/web/apps/space/src/pages/app/profile.tsxindex 8df64aea5c..213a059565 100644--- a/web/apps/space/src/pages/app/profile.tsx+++ b/web/apps/space/src/pages/app/profile.tsx@@ -27,7 +27,6 @@ const Page: React.FC = () => {profile,profileLoadError,profileLoadStatus,- refreshProfile,setFriends,} = useSpaceAppState();const [posts, setPosts] = useState<SpacePost[]>([]);@@ -78,10 +77,8 @@ const Page: React.FC = () => {if (profileLoadStatus != "ready" || !profile) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={profileBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/app/settings.tsx b/web/apps/space/src/pages/app/settings.tsxindex c3926b0acc..1dc1891577 100644--- a/web/apps/space/src/pages/app/settings.tsx+++ b/web/apps/space/src/pages/app/settings.tsx@@ -13,7 +13,6 @@ const Page: React.FC = () => {profile,profileLoadError,profileLoadStatus,- refreshProfile,resetAfterLogout,} = useSpaceAppState();@@ -26,10 +25,8 @@ const Page: React.FC = () => {if (profileLoadStatus != "ready" || !profile) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={settingsBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/index.tsx b/web/apps/space/src/pages/index.tsxindex 60ca7c2a74..dddc6e0462 100644--- a/web/apps/space/src/pages/index.tsx+++ b/web/apps/space/src/pages/index.tsx@@ -98,7 +98,6 @@ const Page: React.FC = () => {profile,profileLoadError,profileLoadStatus,- refreshProfile,setOnboardingEntrySource,} = useSpaceAppState();const [routeMode, setRouteMode] = useState<RouteMode>({ kind: "checking" });@@ -206,10 +205,8 @@ const Page: React.FC = () => {if (hasProfileLoadError) {return (<SpaceRouteFallback- actionLabel="Retry"background={profileBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/invite.tsx b/web/apps/space/src/pages/invite.tsxindex 3f4c3f0f57..f134e47ec6 100644--- a/web/apps/space/src/pages/invite.tsx+++ b/web/apps/space/src/pages/invite.tsx@@ -12,8 +12,7 @@ import { spaceRoutes } from "utils/spaceRoutes";const Page: React.FC = () => {const router = useRouter();- const { profile, profileLoadError, profileLoadStatus, refreshProfile } =- useSpaceAppState();+ const { profile, profileLoadError, profileLoadStatus } = useSpaceAppState();const [profileLink, setProfileLink] = useState<string>();const [linkError, setLinkError] = useState<string>();const [isLinkLoading, setIsLinkLoading] = useState(false);@@ -48,10 +47,8 @@ const Page: React.FC = () => {if (profileLoadStatus != "ready" || !profile) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={shareProfileLinkBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/pages/setup-profile.tsx b/web/apps/space/src/pages/setup-profile.tsxindex ddf461a10a..d18f75b6f5 100644--- a/web/apps/space/src/pages/setup-profile.tsx+++ b/web/apps/space/src/pages/setup-profile.tsx@@ -127,10 +127,8 @@ const Page: React.FC = () => {if (profileLoadStatus != "ready" || profile) {return (<SpaceRouteFallback- actionLabel={profileLoadStatus == "error" ? "Retry" : undefined}background={setupProfileBackground}message={profileLoadError}- onAction={() => void refreshProfile()}/>);}diff --git a/web/apps/space/src/state/SpaceAppStateProvider.tsx b/web/apps/space/src/state/SpaceAppStateProvider.tsxindex 0b51840c55..2270670705 100644--- a/web/apps/space/src/state/SpaceAppStateProvider.tsx+++ b/web/apps/space/src/state/SpaceAppStateProvider.tsx@@ -97,7 +97,7 @@ export const SpaceAppStateProvider: React.FC<React.PropsWithChildren> = ({const profileErrorMessage = (error: unknown) =>error instanceof Error? error.message- : "Couldn't load your Space profile. Please try again.";+ : "Couldn't load your Space profile. Please try again or contact support.";const refreshProfile = useCallback(async () => {const generation = ++profileLoadGenerationRef.current;