u
This commit is contained in:
1 parent
572011017a
commit
ff3ee944d5
4 files changed
+215
-98
No files matched your search
@@ -1,29 +1,34 @@
|
||||
import { useRouter } from 'expo-router'
|
||||
import { Text, View } from 'react-native'
|
||||
import { ScrollView } from 'react-native-gesture-handler'
|
||||
import { AButton, ACell, ACellGroup } from '@/components/common/ao'
|
||||
import EmptyState from '@/components/common/EmptyStatus'
|
||||
import { Grid, GridItem } from '@/components/ui/grid'
|
||||
import { useMoneyCategoryStore } from '@/store/moneyCategory'
|
||||
import { useSpaceStore } from '@/store/space'
|
||||
|
||||
export default function Demo() {
|
||||
const moneyCategoryStore = useMoneyCategoryStore()
|
||||
const router = useRouter()
|
||||
const spaceStore = useSpaceStore()
|
||||
|
||||
function getCategories() {
|
||||
console.log(moneyCategoryStore.categories)
|
||||
}
|
||||
|
||||
async function resetCategory() {
|
||||
moneyCategoryStore.setCategories([])
|
||||
await moneyCategoryStore.init()
|
||||
function NoSpaceTip() {
|
||||
return (
|
||||
<EmptyState
|
||||
description="还没有加入空间,选择一个加入或自己创建一个,开始聊天!"
|
||||
footer={
|
||||
<AButton size="sm">创建 / 加入 空间</AButton>
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<ScrollView>
|
||||
<Grid className="gap-4 p-4" _extra={{ className: 'grid-cols-12' }}>
|
||||
<GridItem className="bg-background-50 p-6 rounded-md" _extra={{ className: 'col-span-3' }} />
|
||||
<GridItem className="bg-background-50 p-6 rounded-md" _extra={{ className: 'col-span-3' }} />
|
||||
<GridItem className="bg-background-50 p-6 rounded-md" _extra={{ className: 'col-span-3' }} />
|
||||
<GridItem className="bg-background-50 p-6 rounded-md" _extra={{ className: 'col-span-3' }} />
|
||||
</Grid>
|
||||
</ScrollView>
|
||||
<View className="flex-1">
|
||||
{
|
||||
spaceStore.inSpace()
|
||||
? (<View></View>)
|
||||
: <NoSpaceTip />
|
||||
}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user