ふぁぼ駅を表示するように変更(現在地が表示されない)
This commit is contained in:
parent
f580e319cf
commit
12f23bef16
6
App.js
6
App.js
@ -19,6 +19,12 @@ import News from "./components/news.js";
|
|||||||
import Setting from "./components/settings.js";
|
import Setting from "./components/settings.js";
|
||||||
import TrainMenu from "./components/trainMenu.js";
|
import TrainMenu from "./components/trainMenu.js";
|
||||||
import FavoriteList from "./components/FavoriteList.js";
|
import FavoriteList from "./components/FavoriteList.js";
|
||||||
|
import { LogBox } from "react-native";
|
||||||
|
|
||||||
|
LogBox.ignoreLogs([
|
||||||
|
"ViewPropTypes will be removed",
|
||||||
|
"ColorPropType will be removed",
|
||||||
|
]);
|
||||||
const Stack = createStackNavigator();
|
const Stack = createStackNavigator();
|
||||||
const Tab = createBottomTabNavigator();
|
const Tab = createBottomTabNavigator();
|
||||||
if (Platform.OS === "android") {
|
if (Platform.OS === "android") {
|
||||||
|
@ -5,6 +5,10 @@ import ActionSheet from "react-native-actions-sheet";
|
|||||||
import Sign from "../../components/駅名表/Sign";
|
import Sign from "../../components/駅名表/Sign";
|
||||||
|
|
||||||
import { TicketBox } from "../atom/TicketBox";
|
import { TicketBox } from "../atom/TicketBox";
|
||||||
|
import {
|
||||||
|
widthPercentageToDP as wp,
|
||||||
|
heightPercentageToDP as hp,
|
||||||
|
} from "react-native-responsive-screen";
|
||||||
|
|
||||||
export const StationDeteilView = (props) => {
|
export const StationDeteilView = (props) => {
|
||||||
const {
|
const {
|
||||||
@ -44,6 +48,12 @@ export const StationDeteilView = (props) => {
|
|||||||
</View>
|
</View>
|
||||||
<View>
|
<View>
|
||||||
{currentStation && (
|
{currentStation && (
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
margin: 10,
|
||||||
|
marginHorizontal: wp("10%"),
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Sign
|
<Sign
|
||||||
currentStation={currentStation}
|
currentStation={currentStation}
|
||||||
originalStationList={originalStationList}
|
originalStationList={originalStationList}
|
||||||
@ -51,6 +61,7 @@ export const StationDeteilView = (props) => {
|
|||||||
setFavoriteStation={setFavoriteStation}
|
setFavoriteStation={setFavoriteStation}
|
||||||
oP={() => Linking.openURL(currentStation[0].StationTimeTable)}
|
oP={() => Linking.openURL(currentStation[0].StationTimeTable)}
|
||||||
/>
|
/>
|
||||||
|
</View>
|
||||||
)}
|
)}
|
||||||
{currentStation && (
|
{currentStation && (
|
||||||
<View style={{ flexDirection: "row" }}>
|
<View style={{ flexDirection: "row" }}>
|
||||||
|
@ -40,7 +40,6 @@ export default function Sign(props) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(isFavorite.length);
|
|
||||||
setTestButtonStatus(isFavorite.length != 0);
|
setTestButtonStatus(isFavorite.length != 0);
|
||||||
}, [favoriteStation, currentStation]);
|
}, [favoriteStation, currentStation]);
|
||||||
|
|
||||||
@ -260,8 +259,6 @@ const styleSheet = {
|
|||||||
height: (wp("80%") / 20) * 9,
|
height: (wp("80%") / 20) * 9,
|
||||||
borderColor: "#2E94BB",
|
borderColor: "#2E94BB",
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
margin: 10,
|
|
||||||
marginHorizontal: wp("10%"),
|
|
||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
},
|
},
|
||||||
下帯: {
|
下帯: {
|
||||||
|
27
menu.js
27
menu.js
@ -1,4 +1,5 @@
|
|||||||
import React, { useRef, useState, useEffect } from "react";
|
import React, { useRef, useState, useEffect } from "react";
|
||||||
|
import Carousel from "react-native-snap-carousel";
|
||||||
import {
|
import {
|
||||||
Platform,
|
Platform,
|
||||||
View,
|
View,
|
||||||
@ -119,6 +120,9 @@ export default function Menu(props) {
|
|||||||
const [delayData, setDelayData] = useState(undefined);
|
const [delayData, setDelayData] = useState(undefined);
|
||||||
const [getTime, setGetTime] = useState(new Date());
|
const [getTime, setGetTime] = useState(new Date());
|
||||||
const [loadingDelayData, setLoadingDelayData] = useState(true);
|
const [loadingDelayData, setLoadingDelayData] = useState(true);
|
||||||
|
const carouselRef = useRef();
|
||||||
|
const scrollRef = useRef();
|
||||||
|
const [isScroll, setIsScroll] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch(
|
fetch(
|
||||||
@ -141,7 +145,7 @@ export default function Menu(props) {
|
|||||||
>
|
>
|
||||||
<StatusbarDetect />
|
<StatusbarDetect />
|
||||||
<TitleBar />
|
<TitleBar />
|
||||||
<ScrollView>
|
<ScrollView ref={scrollRef} scrollEnabled={isScroll}>
|
||||||
<TopMenuButton />
|
<TopMenuButton />
|
||||||
<TextBox
|
<TextBox
|
||||||
backgroundColor="#0099CC"
|
backgroundColor="#0099CC"
|
||||||
@ -159,17 +163,30 @@ export default function Menu(props) {
|
|||||||
列車の運行計画・混雑状況・感染症対策への取り組み
|
列車の運行計画・混雑状況・感染症対策への取り組み
|
||||||
</Text>
|
</Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
{currentStation && (
|
<Carousel
|
||||||
<>
|
ref={carouselRef}
|
||||||
|
layout={"default"}
|
||||||
|
data={originalStationList && favoriteStation}
|
||||||
|
sliderWidth={wp("100%")}
|
||||||
|
itemWidth={wp("80%")}
|
||||||
|
enableMomentum
|
||||||
|
callbackOffsetMargin={1000}
|
||||||
|
renderItem={({ item, index }) => {
|
||||||
|
return (
|
||||||
|
<View style={{ marginVertical: 10 }} key={item[0].StationNumber}>
|
||||||
<Sign
|
<Sign
|
||||||
currentStation={currentStation}
|
currentStation={item}
|
||||||
originalStationList={originalStationList}
|
originalStationList={originalStationList}
|
||||||
favoriteStation={favoriteStation}
|
favoriteStation={favoriteStation}
|
||||||
setFavoriteStation={setFavoriteStation}
|
setFavoriteStation={setFavoriteStation}
|
||||||
oP={StationBoardAcSR.current?.setModalVisible}
|
oP={StationBoardAcSR.current?.setModalVisible}
|
||||||
/>
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{currentStation && (
|
||||||
<LED_vision station={currentStation[0]} navigate={navigate} />
|
<LED_vision station={currentStation[0]} navigate={navigate} />
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
<JRSTraInfoBox
|
<JRSTraInfoBox
|
||||||
JRSTraInfoEXAcSR={JRSTraInfoEXAcSR}
|
JRSTraInfoEXAcSR={JRSTraInfoEXAcSR}
|
||||||
|
Loading…
Reference in New Issue
Block a user