Commit 6148992d authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Selección de puntos en el mapa

parent d4d03c64
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
import { useLocalSearchParams } from "expo-router";
import { Text } from "react-native";
import { RoutePreviewPage } from "../../src/route/screens/route_preview";

export default function GenerateRoute() {
    const { townId } = useLocalSearchParams<{ townId: string }>();
    if (!townId) {
        return <Text>Invalid town id</Text>;
    }
    return <RoutePreviewPage townId={parseInt(townId)} />;
}
 No newline at end of file
+2 −52
Original line number Diff line number Diff line
@@ -2,63 +2,13 @@ import { View, StyleSheet, Image, Text, Button } from "react-native";
import { LIGTHT_THEME } from "../src/common/constants/theme";
import { SignUpForm } from "../src/auth/components/sign_up_form";
import { router } from "expo-router";
import { SignUpPage } from "../src/auth/pages/sign_up_page";
const loginImage = require("../assets/login-image.jpg");

const SignUp = () => {
  return (
    <View style={styles.mainContainer}>
      <View style={styles.imageContainer}>
        <Image
          source={loginImage}
          style={{ width: "100%", height: "100%" }}
          resizeMode="cover"
        />
      </View>
      <View style={styles.loginContainer}>
        <SignUpForm />
        <Button title="Login" onPress={() => router.replace('/login')}/>
      </View>
    </View>
    <SignUpPage />
  );
};

const styles = StyleSheet.create({
  mainContainer: {
    flex: 1,
    backgroundColor: LIGTHT_THEME.color.background,
  },
  imageContainer: {
    height: "40%",
    overflow: "hidden",
    borderBottomLeftRadius: 70,
    elevation: 5,
  },
  loginContainer: {
    marginHorizontal: 20,
    marginTop: "-30%",
    marginBottom: 20,
    elevation: 5,
    borderRadius: 10,
    backgroundColor: LIGTHT_THEME.color.white,
    height: "70%",
  },
  loginScroll: {
    padding: 20,
    gap: 10,
    justifyContent: "center",
  },
  title: { fontSize: 30, fontWeight: "bold", alignSelf: "center" },
  submitBtn: {
    backgroundColor: "black",
    borderRadius: 5,
    width: "100%",
    padding: 10,
    justifyContent: "center",
    alignItems: "center",
  },
  submitBtnText: {
    color: "white",
    fontSize: 20,
  }
});
export default SignUp;
+12 −0
Original line number Diff line number Diff line
import { useLocalSearchParams } from "expo-router";
import { MapsPage } from "../../../src/route/screens/maps";

export default function ActiveTravel () {
    const { id } = useLocalSearchParams<{ id: string }>();
    if (!id) {
        return null;
    }
    return (
        <MapsPage routeId={parseInt(id)} />
    );
}
 No newline at end of file
+1968 −835

File changed.

Preview size limit exceeded, changes collapsed.

+3 −1
Original line number Diff line number Diff line
@@ -35,7 +35,9 @@
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "~3.29.0",
    "expo-av": "~13.10.6",
    "@react-native-community/slider": "4.4.2"
    "@react-native-community/slider": "4.4.2",
    "react-native-maps": "1.10.0",
    "react-native-svg": "14.1.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
Loading