不要なnavigateを移動
This commit is contained in:
parent
f263dde61c
commit
b9a31f413b
1
Apps.js
1
Apps.js
@ -311,7 +311,6 @@ export default function Apps({ stationData }) {
|
|||||||
<EachTrainInfoCore
|
<EachTrainInfoCore
|
||||||
{...{
|
{...{
|
||||||
data: trainInfo.trainNum ? trainInfo : undefined,
|
data: trainInfo.trainNum ? trainInfo : undefined,
|
||||||
navigate,
|
|
||||||
originalStationList,
|
originalStationList,
|
||||||
openStationACFromEachTrainInfo,
|
openStationACFromEachTrainInfo,
|
||||||
from: "Train",
|
from: "Train",
|
||||||
|
@ -7,7 +7,6 @@ export const LongHeader = ({
|
|||||||
currentPosition,
|
currentPosition,
|
||||||
nearTrainIDList,
|
nearTrainIDList,
|
||||||
openTrainInfo,
|
openTrainInfo,
|
||||||
navigate,
|
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<ScrollView
|
<ScrollView
|
||||||
@ -28,7 +27,6 @@ export const LongHeader = ({
|
|||||||
currentPosition={currentPosition}
|
currentPosition={currentPosition}
|
||||||
nearTrainIDList={nearTrainIDList}
|
nearTrainIDList={nearTrainIDList}
|
||||||
openTrainInfo={openTrainInfo}
|
openTrainInfo={openTrainInfo}
|
||||||
navigate={navigate}
|
|
||||||
/>
|
/>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
|
@ -7,7 +7,6 @@ export const ShortHeader = ({
|
|||||||
currentPosition,
|
currentPosition,
|
||||||
nearTrainIDList,
|
nearTrainIDList,
|
||||||
openTrainInfo,
|
openTrainInfo,
|
||||||
navigate,
|
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<ScrollView
|
<ScrollView
|
||||||
@ -30,7 +29,6 @@ export const ShortHeader = ({
|
|||||||
currentPosition={currentPosition}
|
currentPosition={currentPosition}
|
||||||
nearTrainIDList={nearTrainIDList}
|
nearTrainIDList={nearTrainIDList}
|
||||||
openTrainInfo={openTrainInfo}
|
openTrainInfo={openTrainInfo}
|
||||||
navigate={navigate}
|
|
||||||
/>
|
/>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
);
|
);
|
||||||
|
@ -5,6 +5,7 @@ import { useDeviceOrientationChange } from "../../../stateBox/useDeviceOrientati
|
|||||||
import { getStationList2 } from "../../../lib/getStationList2";
|
import { getStationList2 } from "../../../lib/getStationList2";
|
||||||
import { useCurrentTrain } from "../../../stateBox/useCurrentTrain";
|
import { useCurrentTrain } from "../../../stateBox/useCurrentTrain";
|
||||||
import { SheetManager } from "react-native-actions-sheet";
|
import { SheetManager } from "react-native-actions-sheet";
|
||||||
|
import { useNavigation } from "@react-navigation/native";
|
||||||
|
|
||||||
export const TrainDataView = ({
|
export const TrainDataView = ({
|
||||||
currentTrainData,
|
currentTrainData,
|
||||||
@ -12,8 +13,8 @@ export const TrainDataView = ({
|
|||||||
nearTrainIDList,
|
nearTrainIDList,
|
||||||
openTrainInfo,
|
openTrainInfo,
|
||||||
mode = 0,
|
mode = 0,
|
||||||
navigate,
|
|
||||||
}) => {
|
}) => {
|
||||||
|
const { navigate } = useNavigation();
|
||||||
const { width, height } = useWindowDimensions();
|
const { width, height } = useWindowDimensions();
|
||||||
const { isLandscape } = useDeviceOrientationChange();
|
const { isLandscape } = useDeviceOrientationChange();
|
||||||
const { webview, getCurrentTrain } = useCurrentTrain();
|
const { webview, getCurrentTrain } = useCurrentTrain();
|
||||||
@ -42,8 +43,11 @@ export const TrainDataView = ({
|
|||||||
if (x.StationNumber == currentPosition[0])
|
if (x.StationNumber == currentPosition[0])
|
||||||
test.push({ line: d, station: x });
|
test.push({ line: d, station: x });
|
||||||
});
|
});
|
||||||
if(currentPosition[0]== "M12"){
|
if (currentPosition[0] == "M12") {
|
||||||
test.push({ line: "seto", station: {Station_JP: "児島", MyStation: "0"}});
|
test.push({
|
||||||
|
line: "seto",
|
||||||
|
station: { Station_JP: "児島", MyStation: "0" },
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!test.length) return;
|
if (!test.length) return;
|
||||||
|
@ -32,18 +32,18 @@ import { getType } from "../../lib/eachTrainInfoCoreLib/getType";
|
|||||||
import { searchSpecialTrain } from "../../lib/eachTrainInfoCoreLib/searchSpecialTrain";
|
import { searchSpecialTrain } from "../../lib/eachTrainInfoCoreLib/searchSpecialTrain";
|
||||||
import { openBackTrainInfo } from "../../lib/eachTrainInfoCoreLib/openBackTrainInfo";
|
import { openBackTrainInfo } from "../../lib/eachTrainInfoCoreLib/openBackTrainInfo";
|
||||||
import { ShowSpecialTrain } from "./EachTrainInfo/ShowSpecialTrain";
|
import { ShowSpecialTrain } from "./EachTrainInfo/ShowSpecialTrain";
|
||||||
|
import { useNavigation } from "@react-navigation/native";
|
||||||
|
|
||||||
export const EachTrainInfoCore = ({
|
export const EachTrainInfoCore = ({
|
||||||
actionSheetRef,
|
actionSheetRef,
|
||||||
data,
|
data,
|
||||||
navigate,
|
|
||||||
originalStationList,
|
originalStationList,
|
||||||
openStationACFromEachTrainInfo,
|
openStationACFromEachTrainInfo,
|
||||||
from,
|
from,
|
||||||
setTrainInfo,
|
setTrainInfo,
|
||||||
}) => {
|
}) => {
|
||||||
// const [actionSheetHorizonalScroll, setActionSheetHorizonalScroll] = useState(false);
|
// const [actionSheetHorizonalScroll, setActionSheetHorizonalScroll] = useState(false);
|
||||||
|
const { navigate } = useNavigation();
|
||||||
const { currentTrain } = useCurrentTrain();
|
const { currentTrain } = useCurrentTrain();
|
||||||
const [currentTrainData, setCurrentTrainData] = useState();
|
const [currentTrainData, setCurrentTrainData] = useState();
|
||||||
|
|
||||||
@ -309,7 +309,6 @@ export const EachTrainInfoCore = ({
|
|||||||
currentPosition={currentPosition}
|
currentPosition={currentPosition}
|
||||||
nearTrainIDList={nearTrainIDList}
|
nearTrainIDList={nearTrainIDList}
|
||||||
openTrainInfo={openTrainInfo}
|
openTrainInfo={openTrainInfo}
|
||||||
navigate={navigate}
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
longHeader={
|
longHeader={
|
||||||
@ -318,7 +317,6 @@ export const EachTrainInfoCore = ({
|
|||||||
currentPosition={currentPosition}
|
currentPosition={currentPosition}
|
||||||
nearTrainIDList={nearTrainIDList}
|
nearTrainIDList={nearTrainIDList}
|
||||||
openTrainInfo={openTrainInfo}
|
openTrainInfo={openTrainInfo}
|
||||||
navigate={navigate}
|
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
topStickyContent={
|
topStickyContent={
|
||||||
|
Loading…
Reference in New Issue
Block a user