u
This commit is contained in:
1 parent
c2c5cc92af
commit
caed43a011
60 files changed
+1710
-1272
No files matched your search
@@ -4,9 +4,9 @@ import { useFonts } from 'expo-font'
|
||||
import { Stack, useRouter } from 'expo-router'
|
||||
import * as SplashScreen from 'expo-splash-screen'
|
||||
import { StatusBar } from 'expo-status-bar'
|
||||
import { RefreshCw } from 'lucide-react-native'
|
||||
import { useEffect } from 'react'
|
||||
import { KeyboardProvider } from 'react-native-keyboard-controller'
|
||||
import { AButton } from '@/components/common/ao'
|
||||
import EmptyState from '@/components/common/EmptyStatus'
|
||||
import { GluestackUIProvider } from '@/components/ui/gluestack-ui-provider'
|
||||
import { useUserStore } from '@/store/user'
|
||||
@@ -18,19 +18,21 @@ import 'react-native-gesture-handler'
|
||||
SplashScreen.preventAutoHideAsync()
|
||||
|
||||
export const unstable_settings = {
|
||||
initialRouteName: 'money', // 指向你想默认显示的页面
|
||||
initialRouteName: 'money',
|
||||
}
|
||||
|
||||
export function ErrorBoundary({ error, retry }: ErrorBoundaryProps) {
|
||||
return (
|
||||
<GluestackUIProvider>
|
||||
<EmptyState
|
||||
image={require('@/static/images/server-error.png')}
|
||||
type="error"
|
||||
title="(´・ω・`) 出错啦~"
|
||||
description={`发生了一点小问题:\n${error?.message || '请稍后再试'}`}
|
||||
buttonText="重新加载"
|
||||
buttonIcon={RefreshCw}
|
||||
onButtonPress={retry}
|
||||
footer={(
|
||||
<AButton onPress={retry} leftIcon={{ icon: 'RotateCcw', size: 18, color: '#fff' }}>
|
||||
再试一下
|
||||
</AButton>
|
||||
)}
|
||||
/>
|
||||
</GluestackUIProvider>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user