From f321888bc3a921191f6111db0f42d75dd34961ec Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Tue, 23 Jun 2020 20:26:45 +0200 Subject: [PATCH] Removed map screen --- src/navigation/MainNavigator.js | 8 -- src/screens/Services/MapScreen.js | 104 ------------------------- src/screens/Services/ServicesScreen.js | 9 --- 3 files changed, 121 deletions(-) delete mode 100644 src/screens/Services/MapScreen.js diff --git a/src/navigation/MainNavigator.js b/src/navigation/MainNavigator.js index 68187c9..79aca49 100644 --- a/src/navigation/MainNavigator.js +++ b/src/navigation/MainNavigator.js @@ -30,7 +30,6 @@ import ClubAboutScreen from "../screens/Amicale/Clubs/ClubAboutScreen"; import ClubDisplayScreen from "../screens/Amicale/Clubs/ClubDisplayScreen"; import {createScreenCollapsibleStack, getWebsiteStack} from "../utils/CollapsibleUtils"; import BugReportScreen from "../screens/Other/FeedbackScreen"; -import MapScreen from "../screens/Services/MapScreen"; const modalTransition = Platform.OS === 'ios' ? TransitionPresets.ModalPresentationIOS : TransitionPresets.ModalSlideFromBottomIOS; @@ -107,13 +106,6 @@ function MainStackComponent(props: { createTabNavigator: () => React.Node }) { {getWebsiteStack("available-rooms", MainStack, AvailableRoomScreen, i18n.t('screens.availableRooms'))} {getWebsiteStack("bib", MainStack, BibScreen, i18n.t('screens.bib'))} {createScreenCollapsibleStack("self-menu", MainStack, SelfMenuScreen, i18n.t('screens.menuSelf'))} - {/* STUDENTS */} {createScreenCollapsibleStack("proximo", MainStack, ProximoMainScreen, i18n.t('screens.proximo'))} diff --git a/src/screens/Services/MapScreen.js b/src/screens/Services/MapScreen.js deleted file mode 100644 index 9458ec1..0000000 --- a/src/screens/Services/MapScreen.js +++ /dev/null @@ -1,104 +0,0 @@ -// @flow - -import * as React from 'react'; -import {View} from 'react-native'; -import {withTheme} from 'react-native-paper'; -import {StackNavigationProp} from "@react-navigation/stack"; -import type {CustomTheme} from "../../managers/ThemeManager"; -import MapboxGL from "@react-native-mapbox-gl/maps"; - -type Props = { - navigation: StackNavigationProp, - theme: CustomTheme, -} - -type State = { - featureCollection: Array, -} - -MapboxGL.setAccessToken("pk.eyJ1IjoiYW1pY2FsZS1pbnNhdCIsImEiOiJja2JpM2d5OHYwYmdiMndxdnV4bmh6bGFwIn0.qiOwbs2_HRaQGUOpBDjbsQ"); - -// const styles = { -// icon: { -// iconImage: exampleIcon, -// iconAllowOverlap: true, -// }, -// }; - -// const FEATURES = [{ -// type: 'Feature', -// geometry: { -// type: 'Point', -// coordinates: [1.4669608, 43.5698867], -// } -// }] - -/** - * Class defining the app's map screen. - */ -class MapScreen extends React.Component { - - map: { current: null | MapboxGL.MapView }; - - constructor() { - super(); - this.map = React.createRef(); - - this.state = { - featureCollection: [], - }; - } - - componentDidMount() { - MapboxGL.setTelemetryEnabled(false); - - } - - // onSymbolPress = (feature) => { - // console.log("coucou"); - // } - // - // - // onSourceLayerPress = ({features, coordinates, point}) => { - // console.log( - // 'You pressed a layer here are your features:', - // features, - // coordinates, - // point, - // ); - // } - - render() { - return ( - - { - console.log(e) - }} - > - - {/**/} - {/* */} - {/**/} - - - ); - } -} - -export default withTheme(MapScreen); diff --git a/src/screens/Services/ServicesScreen.js b/src/screens/Services/ServicesScreen.js index 519095a..edd5f37 100644 --- a/src/screens/Services/ServicesScreen.js +++ b/src/screens/Services/ServicesScreen.js @@ -31,7 +31,6 @@ const WIKETUD_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Wiketud const EE_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/EEC.png"; const TUTORINSA_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/TutorINSA.png"; -const MAP_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Map.png"; const BIB_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Bib.png"; const RU_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/RU.png"; const ROOM_IMAGE = "https://etud.insa-toulouse.fr/~amicale_app/images/Salles.png"; @@ -50,8 +49,6 @@ type State = { isLoggedIn: boolean, } -// TODO translate subtitles - class ServicesScreen extends React.Component { amicaleDataset: cardList; @@ -122,12 +119,6 @@ class ServicesScreen extends React.Component { }, ]; this.insaDataset = [ - { - title: i18n.t('screens.map'), - subtitle: i18n.t('servicesScreen.descriptions.map'), - image: MAP_IMAGE, - onPress: () => nav.navigate("map"), - }, { title: i18n.t('screens.menuSelf'), subtitle: i18n.t('servicesScreen.descriptions.self'),