アクションシートの依存更新
This commit is contained in:
@@ -13,13 +13,15 @@ import { useBusAndTrainData } from "../../stateBox/useBusAndTrainData";
|
||||
import { AS } from "../../storageControl";
|
||||
|
||||
export const StationDeteilView = (props) => {
|
||||
if (!props.payload) return <></>;
|
||||
const {
|
||||
StationBoardAcSR,
|
||||
currentStation,
|
||||
originalStationList,
|
||||
navigate,
|
||||
onExit,
|
||||
} = props;
|
||||
goTo,
|
||||
useShow,
|
||||
} = props.payload;
|
||||
const { busAndTrainData } = useBusAndTrainData();
|
||||
const [trainBus, setTrainBus] = useState();
|
||||
useEffect(() => {
|
||||
@@ -43,11 +45,7 @@ export const StationDeteilView = (props) => {
|
||||
? getPDFViewURL(currentStation[0].StationTimeTable)
|
||||
: currentStation[0].StationTimeTable);
|
||||
return (
|
||||
<ActionSheet
|
||||
ref={StationBoardAcSR}
|
||||
gestureEnabled
|
||||
CustomHeaderComponent={<></>}
|
||||
>
|
||||
<ActionSheet gestureEnabled CustomHeaderComponent={<></>}>
|
||||
<View
|
||||
key={currentStation}
|
||||
style={{
|
||||
@@ -85,9 +83,10 @@ export const StationDeteilView = (props) => {
|
||||
? Linking.openURL(currentStation[0].StationTimeTable)
|
||||
: navigate("howto", {
|
||||
info,
|
||||
onExit,
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
oLP={() => Linking.openURL(currentStation[0].StationTimeTable)}
|
||||
/>
|
||||
@@ -109,9 +108,11 @@ export const StationDeteilView = (props) => {
|
||||
info:
|
||||
currentStation[0].JrHpUrl.replace("/index.html", "/") +
|
||||
"/kounai_map.html",
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
oLP={() => {
|
||||
Linking.openURL(
|
||||
@@ -132,9 +133,11 @@ export const StationDeteilView = (props) => {
|
||||
onPressButton={() => {
|
||||
navigate("howto", {
|
||||
info: currentStation[0].JrHpUrl,
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
onLongPressButton={() =>
|
||||
Linking.openURL(currentStation[0].JrHpUrl)
|
||||
@@ -153,9 +156,11 @@ export const StationDeteilView = (props) => {
|
||||
? Linking.openURL(currentStation[0].StationTimeTable)
|
||||
: navigate("howto", {
|
||||
info,
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
onLongPressButton={() =>
|
||||
Linking.openURL(currentStation[0].StationTimeTable)
|
||||
@@ -184,9 +189,11 @@ export const StationDeteilView = (props) => {
|
||||
onPressButton={() => {
|
||||
navigate("howto", {
|
||||
info: trainBus.address,
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
onLongPressButton={() => Linking.openURL(trainBus.address)}
|
||||
>
|
||||
|
Reference in New Issue
Block a user