diff options
author | hailey <me@haileyok.com> | 2025-05-06 10:54:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-06 10:54:08 -0700 |
commit | 521ec8e044e58633530e1864e7abc6e22554d7d3 (patch) | |
tree | e57139a4cfcb9f8859f5e1af008740fc3e8306e3 /src/view/com/util/UserBanner.tsx | |
parent | 973538d246a3f76550611e438152f1a6cad75f49 (diff) | |
download | voidsky-521ec8e044e58633530e1864e7abc6e22554d7d3.tar.zst |
swap out cropper library (#8327)
* mostly implement * type errors * unused import * rm comment * stop accidentally deleting the image while compressing * upgrade * type fixes * upgrade, remove timeout * bump * rm mock * bump --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Diffstat (limited to 'src/view/com/util/UserBanner.tsx')
-rw-r--r-- | src/view/com/util/UserBanner.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/view/com/util/UserBanner.tsx b/src/view/com/util/UserBanner.tsx index e0ace5e48..ab7f25b80 100644 --- a/src/view/com/util/UserBanner.tsx +++ b/src/view/com/util/UserBanner.tsx @@ -1,8 +1,7 @@ import React from 'react' import {Pressable, StyleSheet, View} from 'react-native' -import {Image as RNImage} from 'react-native-image-crop-picker' import {Image} from 'expo-image' -import {ModerationUI} from '@atproto/api' +import {type ModerationUI} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -25,7 +24,12 @@ import { import {StreamingLive_Stroke2_Corner0_Rounded as Library} from '#/components/icons/StreamingLive' import {Trash_Stroke2_Corner0_Rounded as Trash} from '#/components/icons/Trash' import * as Menu from '#/components/Menu' -import {openCamera, openCropper, openPicker} from '../../../lib/media/picker' +import { + openCamera, + openCropper, + openPicker, + type RNImage, +} from '../../../lib/media/picker' export function UserBanner({ type, @@ -52,8 +56,7 @@ export function UserBanner({ } onSelectNewBanner?.( await openCamera({ - width: 3000, - height: 1000, + aspect: [3, 1], }), ) }, [onSelectNewBanner, requestCameraAccessIfNeeded]) @@ -70,11 +73,8 @@ export function UserBanner({ try { onSelectNewBanner?.( await openCropper({ - mediaType: 'photo', - path: items[0].path, - width: 3000, - height: 1000, - webAspectRatio: 3, + imageUri: items[0].path, + aspectRatio: 3 / 1, }), ) } catch (e: any) { |