jrshikoku/lib/getPdfViewURL.ts
harukin-expo-dev-env 892d567991 ts化
2025-01-22 12:03:50 +00:00

8 lines
225 B
TypeScript

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