Clarify props and API contracts
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user