Browse Source

Cleaning unused code

master
GabrielTrettel 3 years ago
parent
commit
94a19c7781
  1. 18
      src/app/screens/RainSharingDataScreen.js
  2. 23
      src/app/screens/SharingFloodZonesScreen.js

18
src/app/screens/RainSharingDataScreen.js

@ -5,7 +5,7 @@ import * as Yup from "yup";
import { Form, SubmitButton, FormField } from "../components/forms"; import { Form, SubmitButton, FormField } from "../components/forms";
import Screen from "../components/Screen"; import Screen from "../components/Screen";
import FormImagePicker from "../components/forms/FormImagePicker"; import FormImagePicker from "../components/forms/FormImagePicker";
import { Text, TouchableOpacity } from "react-native";
import { Text } from "react-native";
import colors from "../config/colors"; import colors from "../config/colors";
import { TouchableNativeFeedback } from "react-native-gesture-handler"; import { TouchableNativeFeedback } from "react-native-gesture-handler";
import { insertRainData } from "../database/databaseLoader"; import { insertRainData } from "../database/databaseLoader";
@ -13,8 +13,6 @@ import { showMessage } from "react-native-flash-message";
import { scaleDimsFromWidth, dimensions } from "../config/dimensions"; import { scaleDimsFromWidth, dimensions } from "../config/dimensions";
import assets from "../config/assets"; import assets from "../config/assets";
import moment from "moment"; import moment from "moment";
import FormDatePicker from "../components/forms/FormDatePicker";
import FormLocationPicker from "../components/forms/FormLocationPicker";
import { EventLocationContext } from "../context/EventLocationContext"; import { EventLocationContext } from "../context/EventLocationContext";
import { useIsFocused } from "@react-navigation/native"; import { useIsFocused } from "@react-navigation/native";
import PickEventDateLocation from "../components/PickEventDateLocation"; import PickEventDateLocation from "../components/PickEventDateLocation";
@ -24,10 +22,8 @@ const validationSchema = Yup.object().shape({
description: Yup.string().label("Description"), description: Yup.string().label("Description"),
}); });
const borderWidth = 4;
function RainSharingDataScreen(props) { function RainSharingDataScreen(props) {
const isFocused = useIsFocused();
const [rain, setRain] = useState(-1); const [rain, setRain] = useState(-1);
const [error, setError] = useState(false); const [error, setError] = useState(false);
@ -151,18 +147,6 @@ const styles = StyleSheet.create({
container: { container: {
backgroundColor: colors.white, backgroundColor: colors.white,
}, },
img_block: {
// flex: 1,
// borderRadius: 5,
// borderStyle: "dotted",
// borderColor: colors.white,
// borderWidth: borderWidth,
// alignItems: "center",
},
imgs_row: {
flexDirection: "row",
justifyContent: "space-between",
},
error_txt: { error_txt: {
fontSize: dimensions.text.default, fontSize: dimensions.text.default,
color: colors.danger, color: colors.danger,

23
src/app/screens/SharingFloodZonesScreen.js

@ -1,13 +1,11 @@
import React, { useState, useContext, useEffect } from "react"; import React, { useState, useContext, useEffect } from "react";
import { StyleSheet, Text, Image, View, PixelRatio } from "react-native";
import { StyleSheet, Text, View } from "react-native";
import * as Yup from "yup"; import * as Yup from "yup";
import { Form, SubmitButton, FormField } from "../components/forms"; import { Form, SubmitButton, FormField } from "../components/forms";
import FormImagePicker from "../components/forms/FormImagePicker"; import FormImagePicker from "../components/forms/FormImagePicker";
import useLocation from "../hooks/useLocation";
import colors from "../config/colors"; import colors from "../config/colors";
import { scaleDimsFromWidth, dimensions } from "../config/dimensions"; import { scaleDimsFromWidth, dimensions } from "../config/dimensions";
import { TouchableNativeFeedback } from "react-native-gesture-handler";
import { insertFloodZone } from "../database/databaseLoader"; import { insertFloodZone } from "../database/databaseLoader";
import { showMessage } from "react-native-flash-message"; import { showMessage } from "react-native-flash-message";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
@ -117,35 +115,16 @@ function SharingFloodZonesScreen(props) {
</Screen> </Screen>
); );
} }
const borderWidth = 4;
const dims = scaleDimsFromWidth(93, 106, 30.0);
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
backgroundColor: colors.white, backgroundColor: colors.white,
}, },
image: {
width: dims.width,
height: dims.height,
resizeMode: "contain",
},
img_block: {
borderRadius: 5,
borderStyle: "dotted",
borderColor: colors.white,
borderWidth: borderWidth,
alignItems: "center",
},
imgs_container: { imgs_container: {
paddingTop: 16, paddingTop: 16,
flexDirection: "row", flexDirection: "row",
justifyContent: "center", justifyContent: "center",
}, },
text: {
paddingTop: 5,
fontSize: dimensions.text.default,
},
error_txt: { error_txt: {
paddingHorizontal: 16, paddingHorizontal: 16,
fontSize: 18, fontSize: 18,

Loading…
Cancel
Save