Skip to content

Commit

Permalink
refactor(code): Improve code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamCallao committed Mar 8, 2024
1 parent b193c89 commit 053c5be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
12 changes: 3 additions & 9 deletions src/modals/SimpleModal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {useState, useCallback} from 'react';
import { View, Text, Button, StyleSheet } from 'react-native';
import Modal from 'react-native-modal';
import { StatusBar } from "expo-status-bar";

const SimpleModal = ({ isVisible, onClose }) => {
return (
Expand All @@ -10,14 +9,9 @@ const SimpleModal = ({ isVisible, onClose }) => {
onBackdropPress={onClose}
useNativeDriver={true}
backdropOpacity={0.5}
// backdropColor="#152432"
// animationIn="fadeIn"
// animationOut="fadeOut"
swipeDirection={['down', 'up']} // Permite deslizar hacia abajo y arriba para cerrar
onSwipeComplete={onClose} // Se llama cuando se completa el gesto de deslizamiento
propagateSwipe // Permite que los gestos de deslizamiento se propaguen a los hijos, útil para ScrollView dentro del modal
>
{/* <StatusBar style="ligth" backgroundColor='#84A1A7' /> */}
swipeDirection={['down', 'up']}
onSwipeComplete={onClose}
propagateSwipe>
<View style={styles.modalContent}>
<Text>Contenido del modal</Text>
<Button title="Cerrar" onPress={onClose} />
Expand Down
4 changes: 0 additions & 4 deletions src/screens/HomeScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ import ProfileHeader from "../components/ProfileHeader";
import StoryItem from "../components/StoryItem";
import { HISTORY_DATA, theme } from "../../constants";
import DropdownSelector from "../components/DropdownSelector";
import { StatusBar } from "expo-status-bar";
import Cascading from "../animation/CascadingFadeInView";
import { useFocusEffect } from "@react-navigation/native";

const secondary = theme.colors.secondary;

const NewScreen = () => {
const [selectedOption, setSelectedOption] = useState("Hoy");
const renderHistoryItem = ({ item, index }) => (
Expand All @@ -35,7 +32,6 @@ const NewScreen = () => {

return (
<SafeAreaView style={styles.safeArea}>
{/* <StatusBar style="ligth" backgroundColor={secondary} /> */}
<View style={styles.header}>
<ProfileHeader userName="Jon Doe" />
<Cascading delay={300} animationKey={animationKey}>
Expand Down

0 comments on commit 053c5be

Please sign in to comment.