mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
11 lines
318 B
TypeScript
11 lines
318 B
TypeScript
|
|
import { useMemo } from "react";
|
||
|
|
import { isAndroid, isIOS } from "../deviceType";
|
||
|
|
|
||
|
|
export const useCanShareNative = (): boolean => {
|
||
|
|
return useMemo(() => {
|
||
|
|
if (typeof window === 'undefined') return false
|
||
|
|
if (!isAndroid() && !isIOS()) return false
|
||
|
|
return typeof navigator?.share == 'function'
|
||
|
|
}, [])
|
||
|
|
}
|