Files
workspace/code/allapp/allapp-rn/src/app/auth/index.tsx
T
2026-01-21 17:19:36 +08:00

51 lines
1.3 KiB
TypeScript

import { useRouter } from 'expo-router'
import { useEffect } from 'react'
import { Image, Text, View } from 'react-native'
import CustomHeader from '@/components/custom/Header'
import { Button, ButtonText } from '@/components/ui/button'
export default function AuthIndex() {
const router = useRouter()
function toPath(url: string) {
router.push(url)
}
return (
<View className="flex-1">
<CustomHeader
showHeader={false}
/>
<View className="flex-1 bg-white items-center justify-center">
<Image
source={require('@/static/images/work.png')}
style={{ width: '100%', height: 280 }}
className="mb-6"
/>
<Image
source={require('@/static/images/logo.png')}
style={{ width: 60, height: 60 }}
className="mb-6"
resizeMode="contain"
/>
<Text className="font-bold text-3xl text-[#333] tracking-wide">
ONEAO
</Text>
<View className="w-full flex flex-col gap-3 mt-12 px-3">
<Button onPress={() => toPath('/auth/login')}>
<ButtonText>登录</ButtonText>
</Button>
<Button action="secondary" onPress={() => toPath('/auth/register')}>
<ButtonText>注册</ButtonText>
</Button>
</View>
</View>
</View>
)
}