diff --git a/apps/mobile/src/modules/settings/routes/Actions.tsx b/apps/mobile/src/modules/settings/routes/Actions.tsx index 970b88b2c..10ffd674f 100644 --- a/apps/mobile/src/modules/settings/routes/Actions.tsx +++ b/apps/mobile/src/modules/settings/routes/Actions.tsx @@ -3,7 +3,7 @@ import { useCallback } from "react" import type { ListRenderItem } from "react-native" import { ActivityIndicator, Text, View } from "react-native" import Animated, { LinearTransition } from "react-native-reanimated" -import { useColor } from "react-native-uikit-colors" +import { useColor, useColors } from "react-native-uikit-colors" import { RotateableLoading } from "@/src/components/common/RotateableLoading" import { SwipeableGroupProvider, SwipeableItem } from "@/src/components/common/SwipeableItem" @@ -128,6 +128,7 @@ const ListItemCell: ListRenderItem = (props) => { } const ListItemCellImpl: ListRenderItem = ({ item: rule }) => { const navigation = useSettingsNavigation() + const colors = useColors() return ( = ({ item: rule }) => { onPress: () => { actionActions.deleteRule(rule.index) }, - backgroundColor: "red", + backgroundColor: colors.red, }, { label: "Edit", onPress: () => { navigation.navigate("EditRule", { index: rule.index }) }, - backgroundColor: "#0ea5e9", + backgroundColor: colors.blue, }, ]} > diff --git a/apps/mobile/src/modules/settings/routes/EditRule.tsx b/apps/mobile/src/modules/settings/routes/EditRule.tsx index 08330106f..41ad2631e 100644 --- a/apps/mobile/src/modules/settings/routes/EditRule.tsx +++ b/apps/mobile/src/modules/settings/routes/EditRule.tsx @@ -20,7 +20,7 @@ import { views } from "@/src/constants/views" import { useActionRule } from "@/src/store/action/hooks" import { actionActions } from "@/src/store/action/store" import type { ActionFilter, ActionRule } from "@/src/store/action/types" -import { accentColor } from "@/src/theme/colors" +import { accentColor, useColors } from "@/src/theme/colors" import { availableActionList, filterFieldOptions, filterOperatorOptions } from "../actions/constant" import { useSettingsNavigation } from "../hooks" @@ -114,6 +114,7 @@ const FilterSection: React.FC<{ rule: ActionRule }> = ({ rule }) => { const ConditionSection: React.FC<{ filter: ActionFilter; index: number }> = ({ filter, index }) => { const navigation = useSettingsNavigation() + const colors = useColors() if (filter.length === 0) return null return ( @@ -146,7 +147,7 @@ const ConditionSection: React.FC<{ filter: ActionFilter; index: number }> = ({ f conditionIndex: itemIndex, }) }, - backgroundColor: "red", + backgroundColor: colors.red, }, { label: "Edit", @@ -157,7 +158,7 @@ const ConditionSection: React.FC<{ filter: ActionFilter; index: number }> = ({ f conditionIndex: itemIndex, }) }, - backgroundColor: "#0ea5e9", + backgroundColor: colors.blue, }, ]} > @@ -214,6 +215,7 @@ const ActionSection: React.FC<{ rule: ActionRule }> = ({ rule }) => { (action) => rule.result[action.value] === undefined, ) + const colors = useColors() const navigation = useSettingsNavigation() return ( @@ -229,7 +231,7 @@ const ActionSection: React.FC<{ rule: ActionRule }> = ({ rule }) => { onPress: () => { actionActions.deleteRuleAction(rule.index, action.value) }, - backgroundColor: "red", + backgroundColor: colors.red, }, ]} > diff --git a/apps/mobile/src/modules/settings/routes/Lists.tsx b/apps/mobile/src/modules/settings/routes/Lists.tsx index ce569b43f..a560b72d8 100644 --- a/apps/mobile/src/modules/settings/routes/Lists.tsx +++ b/apps/mobile/src/modules/settings/routes/Lists.tsx @@ -3,7 +3,7 @@ import { createContext, createElement, useCallback, useContext, useMemo } from " import type { ListRenderItem } from "react-native" import { ActivityIndicator, Image, StyleSheet, Text, View } from "react-native" import Animated, { LinearTransition } from "react-native-reanimated" -import { useColor } from "react-native-uikit-colors" +import { useColor, useColors } from "react-native-uikit-colors" import { Balance } from "@/src/components/common/Balance" import { UINavigationHeaderActionButton } from "@/src/components/layouts/header/NavigationHeader" @@ -125,6 +125,7 @@ const ListItemCellImpl: ListRenderItem = ({ item: list }) => { const { title, description } = list const listData = useContext(ListContext)[list.id] const navigation = useSettingsNavigation() + const colors = useColors() return ( = ({ item: list }) => { onPress: () => { router.push(`/list?id=${list.id}`) }, - backgroundColor: "#0ea5e9", + backgroundColor: colors.blue, }, ]} >