diff --git a/src/lib/constants.ts b/src/lib/constants.ts index 27f57a14..34da35e4 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -132,3 +132,5 @@ export function LINK_META_PROXY(serviceUrl: string) { return PROD_LINK_META_PROXY } } + +export const STATUS_PAGE_URL = 'https://status.bsky.app/' diff --git a/src/view/com/auth/withAuthRequired.tsx b/src/view/com/auth/withAuthRequired.tsx index a3f02127..8e57669b 100644 --- a/src/view/com/auth/withAuthRequired.tsx +++ b/src/view/com/auth/withAuthRequired.tsx @@ -1,11 +1,17 @@ import React from 'react' -import {ActivityIndicator, StyleSheet} from 'react-native' +import { + ActivityIndicator, + Linking, + StyleSheet, + TouchableOpacity, +} from 'react-native' import {observer} from 'mobx-react-lite' import {useStores} from 'state/index' import {CenteredView} from '../util/Views' import {LoggedOut} from './LoggedOut' import {Text} from '../util/text/Text' import {usePalette} from 'lib/hooks/usePalette' +import {STATUS_PAGE_URL} from 'lib/constants' export const withAuthRequired =
( Component: React.ComponentType
,
@@ -26,7 +32,7 @@ function Loading() {
const [isTakingTooLong, setIsTakingTooLong] = React.useState(false)
React.useEffect(() => {
- const t = setTimeout(() => setIsTakingTooLong(true), 15e3)
+ const t = setTimeout(() => setIsTakingTooLong(true), 15e3) // 15 seconds
return () => clearTimeout(t)
}, [setIsTakingTooLong])
@@ -38,6 +44,17 @@ function Loading() {
? "This is taking too long. There may be a problem with your internet or with the service, but we're going to try a couple more times..."
: 'Connecting...'}
+ {isTakingTooLong ? (
+