diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index b9dcc6e..4817bc2 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -20,6 +20,7 @@ import { heightPercentageToDP as hp, } from "react-native-responsive-screen"; import lineColorList from "../../assets/originData/lineColorList"; +import { getPDFViewURL } from "../../lib/getPdfViewURL"; export const StationDeteilView = (props) => { const { @@ -46,9 +47,7 @@ export const StationDeteilView = (props) => { const info = currentStation && (currentStation[0].StationTimeTable.match(".pdf") - ? `https://docs.google.com/viewer?url=${encodeURI( - currentStation[0].StationTimeTable - )}&embedded=true` + ? getPDFViewURL(currentStation[0].StationTimeTable) : currentStation[0].StationTimeTable); return ( { + if (Platform.OS == "ios") return url; + else + return `https://docs.google.com/viewer?url=${encodeURI(url)}&embedded=true`; +};