about summary refs log tree commit diff
path: root/src/lib/hooks/usePermissions.web.ts
blob: c550a7d6dfec08a590e9e4d3be050b250c1c22ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
export function usePhotoLibraryPermission() {
  const requestPhotoAccessIfNeeded = async () => {
    // On the, we use <input type="file"> to produce a filepicker
    // This does not need any permission granting.
    return true
  }
  return {requestPhotoAccessIfNeeded}
}

export function useCameraPermission() {
  const requestCameraAccessIfNeeded = async () => {
    return false
  }

  return {requestCameraAccessIfNeeded}
}