Files
SeaGateway-App/app/(tabs)/diary.tsx
2025-11-07 16:50:47 +07:00

159 lines
3.4 KiB
TypeScript

import CreateOrUpdateHaulModal from "@/components/tripInfo/modal/CreateOrUpdateHaulModal";
import { useState } from "react";
import { Button, Platform, StyleSheet, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
export default function Warning() {
const [isShowModal, setIsShowModal] = useState(false);
return (
<SafeAreaView style={{ flex: 1 }}>
<View style={styles.container}>
<CreateOrUpdateHaulModal
haulData={fishingInfoDatas}
isVisible={isShowModal}
onClose={function (): void {
setIsShowModal(false);
}}
/>
<Button title="Thêm thu hoạch" onPress={() => setIsShowModal(true)} />
</View>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
scrollContent: {
flexGrow: 1,
},
container: {
alignItems: "center",
padding: 15,
},
titleText: {
fontSize: 32,
fontWeight: "700",
lineHeight: 40,
marginBottom: 10,
fontFamily: Platform.select({
ios: "System",
android: "Roboto",
default: "System",
}),
},
button: {
backgroundColor: "#007AFF",
paddingVertical: 14,
paddingHorizontal: 24,
borderRadius: 8,
marginTop: 20,
},
buttonText: {
color: "#fff",
fontSize: 16,
fontWeight: "600",
},
});
const fishingInfoDatas: Model.FishingLogInfo[] = [
{
fish_species_id: 10,
fish_name: "Cá quỷ biển (Barracuda)",
catch_number: 820,
catch_unit: "kg",
fish_size: 29,
fish_rarity: 1,
fish_condition: "Bị thương",
gear_usage: "",
},
{
fish_species_id: 1,
fish_name: "Cá thu",
catch_number: 1293,
catch_unit: "kg",
fish_size: 37,
fish_rarity: 1,
fish_condition: "Bị thương",
gear_usage: "",
},
{
fish_species_id: 13,
fish_name: "Cá song đỏ",
catch_number: 1738,
catch_unit: "kg",
fish_size: 28,
fish_rarity: 2,
fish_condition: "Còn sống",
gear_usage: "",
},
{
fish_species_id: 17,
fish_name: "Cá nược",
catch_number: 690,
catch_unit: "kg",
fish_size: 63,
fish_rarity: 1,
fish_condition: "Chết",
gear_usage: "",
},
{
fish_species_id: 19,
fish_name: "Cá hổ Thái Lan",
catch_number: 825,
catch_unit: "kg",
fish_size: 55,
fish_rarity: 4,
fish_condition: "Chết",
gear_usage: "Câu tay",
},
{
fish_species_id: 8,
fish_name: "Cá hồng phớn",
catch_number: 1409,
catch_unit: "kg",
fish_size: 172,
fish_rarity: 3,
fish_condition: "Chết",
gear_usage: "Bẫy lưới",
},
{
fish_species_id: 16,
fish_name: "Cá rồng biển",
catch_number: 1426,
catch_unit: "kg",
fish_size: 105,
fish_rarity: 3,
fish_condition: "Chết",
gear_usage: "Lưới rê",
},
{
fish_species_id: 3,
fish_name: "Cá chim trắng",
catch_number: 176,
catch_unit: "kg",
fish_size: 83,
fish_rarity: 2,
fish_condition: "Chết",
gear_usage: "",
},
{
fish_species_id: 14,
fish_name: "Cá mú cườm",
catch_number: 724,
catch_unit: "kg",
fish_size: 36,
fish_rarity: 2,
fish_condition: "Chết",
gear_usage: "",
},
{
fish_species_id: 18,
fish_name: "Cá đuối quạt",
catch_number: 1712,
catch_unit: "kg",
fish_size: 105,
fish_rarity: 4,
fish_condition: "Còn sống",
gear_usage: "Câu vàng",
},
];