update darkMode for modal

This commit is contained in:
2025-11-21 08:50:07 +07:00
parent 51327c7d01
commit 6975358a7f
8 changed files with 750 additions and 766 deletions

View File

@@ -3,6 +3,7 @@ import { IconSymbol } from "@/components/ui/icon-symbol";
import { queryGpsData } from "@/controller/DeviceController";
import { queryUpdateFishingLogs } from "@/controller/TripController";
import { useI18n } from "@/hooks/use-i18n";
import { useThemeContext } from "@/hooks/use-theme-context";
import { showErrorToast, showSuccessToast } from "@/services/toast_service";
import { useFishes } from "@/state/use-fish";
import { useTrip } from "@/state/use-trip";
@@ -21,7 +22,7 @@ import {
} from "react-native";
import { z } from "zod";
import { InfoSection } from "./components/InfoSection";
import styles from "./style/CreateOrUpdateHaulModal.styles";
import { createStyles } from "./style/CreateOrUpdateHaulModal.styles";
interface CreateOrUpdateHaulModalProps {
isVisible: boolean;
@@ -74,6 +75,8 @@ const CreateOrUpdateHaulModal: React.FC<CreateOrUpdateHaulModalProps> = ({
fishingLog,
fishingLogIndex,
}) => {
const { colors } = useThemeContext();
const styles = React.useMemo(() => createStyles(colors), [colors]);
const { t } = useI18n();
const [isCreateMode, setIsCreateMode] = React.useState(!fishingLog?.info);
const [isEditing, setIsEditing] = React.useState(false);
@@ -256,7 +259,7 @@ const CreateOrUpdateHaulModal: React.FC<CreateOrUpdateHaulModalProps> = ({
<TouchableOpacity
onPress={() => remove(index)}
style={{
backgroundColor: "#FF3B30",
backgroundColor: colors.error,
borderRadius: 8,
width: 40,
height: 40,
@@ -277,7 +280,7 @@ const CreateOrUpdateHaulModal: React.FC<CreateOrUpdateHaulModalProps> = ({
<TouchableOpacity
onPress={() => handleToggleExpanded(index)}
style={{
backgroundColor: "#007AFF",
backgroundColor: colors.primary,
borderRadius: 8,
width: 40,
height: 40,