停車駅情報等をsticky-headerに
This commit is contained in:
parent
80f4913f89
commit
b551c75061
@ -67,9 +67,6 @@ export const EachTrainInfo = (props) => {
|
|||||||
showNearTrain.forEach((d) => {
|
showNearTrain.forEach((d) => {
|
||||||
const [station, se, time] = d.split(",");
|
const [station, se, time] = d.split(",");
|
||||||
|
|
||||||
console.log(trainData); //trainDataは現在の列車の停車駅リスト
|
|
||||||
console.log(station); //showNearTrainは裏列車の停車駅リスト
|
|
||||||
console.log(trainData[0]);
|
|
||||||
if (station == trainData[0].split(",")[0])
|
if (station == trainData[0].split(",")[0])
|
||||||
setHeadStation(trainData[0].split(",")[0]);
|
setHeadStation(trainData[0].split(",")[0]);
|
||||||
if (station == trainData[trainData.length - 1].split(",")[0])
|
if (station == trainData[trainData.length - 1].split(",")[0])
|
||||||
@ -556,57 +553,6 @@ export const EachTrainInfo = (props) => {
|
|||||||
</View> */}
|
</View> */}
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)}
|
)}
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
alignItems: "center",
|
|
||||||
backgroundColor: "white",
|
|
||||||
flexDirection: "row",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<View
|
|
||||||
style={{
|
|
||||||
padding: 8,
|
|
||||||
flexDirection: "row",
|
|
||||||
borderBottomWidth: 1,
|
|
||||||
borderBottomColor: "#f0f0f0",
|
|
||||||
flex: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Text style={{ fontSize: 20 }}>停車駅</Text>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
<View style={{ flexDirection: "row" }}>
|
|
||||||
{!isNaN(currentTrainData?.delay) &&
|
|
||||||
currentTrainData?.delay != 0 && (
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontSize: 15,
|
|
||||||
color: "black",
|
|
||||||
position: "absolute",
|
|
||||||
right: 110,
|
|
||||||
textAlign: "right",
|
|
||||||
textDecorationLine: "line-through",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
(定刻)
|
|
||||||
</Text>
|
|
||||||
)}
|
|
||||||
<Text
|
|
||||||
style={{
|
|
||||||
fontSize: 20,
|
|
||||||
color: isNaN(currentTrainData?.delay)
|
|
||||||
? "black"
|
|
||||||
: currentTrainData?.delay == 0
|
|
||||||
? "black"
|
|
||||||
: "red",
|
|
||||||
width: 60,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
見込
|
|
||||||
</Text>
|
|
||||||
<Text style={{ fontSize: 20, width: 50 }}></Text>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
{...scrollHandlers}
|
{...scrollHandlers}
|
||||||
style={{
|
style={{
|
||||||
@ -615,7 +561,60 @@ export const EachTrainInfo = (props) => {
|
|||||||
),
|
),
|
||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
}}
|
}}
|
||||||
|
stickyHeaderIndices={[0]}
|
||||||
>
|
>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
alignItems: "center",
|
||||||
|
backgroundColor: "white",
|
||||||
|
flexDirection: "row",
|
||||||
|
}}
|
||||||
|
index={0}
|
||||||
|
>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
padding: 8,
|
||||||
|
flexDirection: "row",
|
||||||
|
borderBottomWidth: 1,
|
||||||
|
borderBottomColor: "#f0f0f0",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Text style={{ fontSize: 20 }}>停車駅</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<View style={{ flexDirection: "row" }}>
|
||||||
|
{!isNaN(currentTrainData?.delay) &&
|
||||||
|
currentTrainData?.delay != 0 && (
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 15,
|
||||||
|
color: "black",
|
||||||
|
position: "absolute",
|
||||||
|
right: 110,
|
||||||
|
textAlign: "right",
|
||||||
|
textDecorationLine: "line-through",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
(定刻)
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
color: isNaN(currentTrainData?.delay)
|
||||||
|
? "black"
|
||||||
|
: currentTrainData?.delay == 0
|
||||||
|
? "black"
|
||||||
|
: "red",
|
||||||
|
width: 60,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
見込
|
||||||
|
</Text>
|
||||||
|
<Text style={{ fontSize: 20, width: 50 }}></Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
{headStation && !isConcatNear && (
|
{headStation && !isConcatNear && (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => openBackTrainInfo(headStation)}
|
onPress={() => openBackTrainInfo(headStation)}
|
||||||
|
Loading…
Reference in New Issue
Block a user