From 4c8fd006f6a994783a43e4744a3167db7aefc159 Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Tue, 6 May 2025 22:50:28 +0300
Subject: New Edit Profile dialog on web, use new Edit Image dialog everywhere
 (#8220)

---
 src/lib/media/picker.web.tsx | 29 ++++++-----------------------
 1 file changed, 6 insertions(+), 23 deletions(-)

(limited to 'src/lib/media/picker.web.tsx')

diff --git a/src/lib/media/picker.web.tsx b/src/lib/media/picker.web.tsx
index b7d0d6f06..c1e4e4ab7 100644
--- a/src/lib/media/picker.web.tsx
+++ b/src/lib/media/picker.web.tsx
@@ -1,35 +1,18 @@
-/// <reference lib="dom" />
-
 import {type OpenCropperOptions} from 'expo-image-crop-tool'
 
-import {unstable__openModal} from '#/state/modals'
 import {type PickerImage} from './picker.shared'
 import {type CameraOpts} from './types'
 
-export {openPicker, type PickerImage as RNImage} from './picker.shared'
+export {openPicker} from './picker.shared'
 
 export async function openCamera(_opts: CameraOpts): Promise<PickerImage> {
-  // const mediaType = opts.mediaType || 'photo' TODO
-  throw new Error('TODO')
+  throw new Error('openCamera is not supported on web')
 }
 
 export async function openCropper(
-  opts: OpenCropperOptions,
+  _opts: OpenCropperOptions,
 ): Promise<PickerImage> {
-  // TODO handle more opts
-  return new Promise((resolve, reject) => {
-    unstable__openModal({
-      name: 'crop-image',
-      uri: opts.imageUri,
-      aspect: opts.aspectRatio,
-      circular: opts.shape === 'circle',
-      onSelect: (img?: PickerImage) => {
-        if (img) {
-          resolve(img)
-        } else {
-          reject(new Error('Canceled'))
-        }
-      },
-    })
-  })
+  throw new Error(
+    'openCropper is not supported on web. Use EditImageDialog instead.',
+  )
 }
-- 
cgit 1.4.1

