feat: add zero
This commit is contained in:
@@ -1,18 +1,21 @@
|
||||
import { ThemedText } from '@/components/themed-text';
|
||||
import { SafeAreaView } from 'react-native-safe-area-context';
|
||||
import { authClient } from '@/lib/auth-client';
|
||||
import { Button } from 'react-native';
|
||||
import { Button, Text } from 'react-native';
|
||||
import { useQuery, useZero } from "@rocicorp/zero/react";
|
||||
import { queries } from '@money/shared';
|
||||
|
||||
export default function HomeScreen() {
|
||||
const { data } = authClient.useSession();
|
||||
const onLogout = () => {
|
||||
authClient.signOut();
|
||||
}
|
||||
const [transactions] = useQuery(queries.allTransactions());
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
<ThemedText>Hello {data?.user.name}</ThemedText>
|
||||
<Text>Hello {data?.user.name}</Text>
|
||||
<Button onPress={onLogout} title="Logout" />
|
||||
<Text>Transactions: {JSON.stringify(transactions, null, 4)}</Text>
|
||||
</SafeAreaView>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user