jrshikoku/lib/getPdfViewURL.js
2023-12-13 22:39:38 +09:00

8 lines
218 B
JavaScript

import { Platform } from "react-native";
export const getPDFViewURL = (url) => {
if (Platform.OS == "ios") return url;
else
return `https://mozilla.github.io/pdf.js/web/viewer.html?file=${encodeURI(url)}`;
};