29 lines
684 B
TypeScript
29 lines
684 B
TypeScript
import { ScrollView, Text } from 'react-native'
|
|
import { AButton } from '@/components/common/ao'
|
|
import { useUserStore } from '@/store/user'
|
|
|
|
export default function Chat() {
|
|
const userStore = useUserStore()
|
|
|
|
return (
|
|
<ScrollView contentContainerStyle={{ padding: 16, marginTop: 22 }}>
|
|
<AButton
|
|
onPress={() => {
|
|
userStore.setUserInfo({
|
|
...(userStore.userInfo as any),
|
|
token: `test-token-${Date.now()}`,
|
|
})
|
|
}}
|
|
>
|
|
测试
|
|
</AButton>
|
|
|
|
<Text style={{ marginTop: 12 }}>
|
|
当前 token:
|
|
{' '}
|
|
{userStore.userInfo?.token ?? '(无)'}
|
|
</Text>
|
|
</ScrollView>
|
|
)
|
|
}
|