Clarify props and API contracts

This commit is contained in:
Eric Bailey
2026-06-04 10:34:27 -05:00
parent 2c3cba67c2
commit 6b439bf7f4
9 changed files with 33 additions and 38 deletions
@@ -3,7 +3,6 @@ import * as MediaLibrary from 'expo-media-library'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {IMAGE_SIZE_CONFIG_POSTS} from '#/lib/constants'
import {useCameraPermission} from '#/lib/hooks/usePermissions'
import {openCamera} from '#/lib/media/picker'
import {logger} from '#/logger'
@@ -35,7 +34,7 @@ export function OpenCameraBtn({disabled, onAdd}: Props) {
}
const img = await openCamera({
aspect: [IMAGE_SIZE_CONFIG_POSTS.width, IMAGE_SIZE_CONFIG_POSTS.height],
aspect: [1, 1],
})
// If we don't have permissions it's fine, we just wont save it. The post itself will still have access to
@@ -93,8 +93,7 @@ export function TextInput({
if (isUriImage(feature.uri)) {
const res = await downloadAndResize({
uri: feature.uri,
maxDimension: IMAGE_SIZE_CONFIG_POSTS.width,
maxSize: IMAGE_SIZE_CONFIG_POSTS.size,
...IMAGE_SIZE_CONFIG_POSTS,
timeout: 15e3,
})