From 83957d67cb53d8ec3dac215607ceb82401c48110 Mon Sep 17 00:00:00 2001 From: Niels Mokkenstorm Date: Fri, 3 Oct 2025 13:30:42 +0200 Subject: [PATCH] fix: small dark mode fixes --- app/components/theme/themed-button.tsx | 3 ++- .../transaction/transaction-card.tsx | 9 +++++++- .../transaction/transaction-filter.tsx | 23 ++++++++++++++----- app/hooks/use-login.ts | 2 +- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/app/components/theme/themed-button.tsx b/app/components/theme/themed-button.tsx index 6f806cb..97d2cc6 100644 --- a/app/components/theme/themed-button.tsx +++ b/app/components/theme/themed-button.tsx @@ -1,5 +1,6 @@ import { StyleSheet, TouchableOpacity } from "react-native"; -import { ThemedText, ThemedView } from "@/components/theme"; +import { ThemedText } from "./themed-text"; +import { ThemedView } from "./themed-view"; import { useThemeColor } from "@/hooks/use-theme-color"; interface ThemedButtonProps { diff --git a/app/components/transaction/transaction-card.tsx b/app/components/transaction/transaction-card.tsx index e371806..f2e08c3 100644 --- a/app/components/transaction/transaction-card.tsx +++ b/app/components/transaction/transaction-card.tsx @@ -5,6 +5,7 @@ import { Price } from "@/components/ui/price"; import { Transaction } from "@/generated"; import Ionicons from "@expo/vector-icons/Ionicons"; import { mapTransactionTypeToIcon } from "@/services/utils"; +import { useRateColor } from "@/hooks/use-rate-color"; interface TransactionCardProps { transaction: Transaction; @@ -17,11 +18,17 @@ export const TransactionCard = ({ }: TransactionCardProps) => { const { description, amount, date, type } = transaction; + const color = useRateColor(amount); + return ( onPress?.(transaction)}> - + filter transactions for {account?.name} - + Search by description - + Filter by transaction type {transactionTypes?.map(({ name, count }) => ( - + ))} - + Sort by {["amount", "date"]?.map((sort) => ( ))} - + Sort direction {sortDirections?.map((order) => ( - + onSubmit?.(filter)}>filter onSubmit?.({})}>clear onCancel?.()}>cancel @@ -138,4 +144,9 @@ const styles = StyleSheet.create({ borderWidth: 1, padding: 8, }, + fieldContainer: { + borderTopWidth: 1, + marginTop: 4, + paddingVertical: 8, + }, }); diff --git a/app/hooks/use-login.ts b/app/hooks/use-login.ts index 73c2b06..f39321c 100644 --- a/app/hooks/use-login.ts +++ b/app/hooks/use-login.ts @@ -71,7 +71,7 @@ export const useLogin = () => { } setToken(data); - router.replace("/(tabs)"); + router.push("/(tabs)"); } catch (e) { setError(isLoginError(e) ? e : fromError(e)); } -- 2.51.2