format: format with biome

This commit is contained in:
Max Koon
2025-11-24 22:20:40 -05:00
parent 01edded95a
commit 6fd531d9c3
41 changed files with 1025 additions and 667 deletions

View File

@@ -1,8 +1,14 @@
import { authClient } from '@/lib/auth-client';
import { RefreshControl, ScrollView, StatusBar, Text, View } from 'react-native';
import { authClient } from "@/lib/auth-client";
import {
RefreshControl,
ScrollView,
StatusBar,
Text,
View,
} from "react-native";
import { useQuery, useZero } from "@rocicorp/zero/react";
import { queries, type Mutators, type Schema } from '@money/shared';
import { useState } from 'react';
import { queries, type Mutators, type Schema } from "@money/shared";
import { useState } from "react";
export default function HomeScreen() {
const { data: session } = authClient.useSession();
@@ -20,16 +26,43 @@ export default function HomeScreen() {
return (
<>
<StatusBar barStyle="dark-content" />
<ScrollView contentContainerStyle={{ paddingTop: StatusBar.currentHeight, flexGrow: 1 }} refreshControl={<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />} style={{ paddingHorizontal: 10 }}>
{balances.map(balance => <Balance key={balance.id} balance={balance} />)}
<ScrollView
contentContainerStyle={{
paddingTop: StatusBar.currentHeight,
flexGrow: 1,
}}
refreshControl={
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
}
style={{ paddingHorizontal: 10 }}
>
{balances.map((balance) => (
<Balance key={balance.id} balance={balance} />
))}
</ScrollView>
</>
);
}
function Balance({ balance }: { balance: { name: string, current: number, avaliable: number } }) {
return <View style={{ backgroundColor: "#eee", borderColor: "#ddd", borderWidth: 1, marginBottom: 10, borderRadius: 10 }}>
<Text style={{ fontSize: 15, textAlign: "center" }}>{balance.name}</Text>
<Text style={{ fontSize: 30, textAlign: "center" }}>{balance.current}</Text>
</View>
function Balance({
balance,
}: {
balance: { name: string; current: number; avaliable: number };
}) {
return (
<View
style={{
backgroundColor: "#eee",
borderColor: "#ddd",
borderWidth: 1,
marginBottom: 10,
borderRadius: 10,
}}
>
<Text style={{ fontSize: 15, textAlign: "center" }}>{balance.name}</Text>
<Text style={{ fontSize: 30, textAlign: "center" }}>
{balance.current}
</Text>
</View>
);
}