diff --git a/package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx b/package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx index 881d366906..3ec04c79f8 100644 --- a/package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx +++ b/package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx @@ -27,8 +27,14 @@ export const AttachmentPickerSelectionBar = () => { setSelectedPicker, } = useAttachmentPickerContext(); - const { hasCameraPicker, hasFilePicker, imageUploads, pickFile, takeAndUploadImage } = - useMessageInputContext(); + const { + hasCameraPicker, + hasFilePicker, + hasImagePicker, + imageUploads, + pickFile, + takeAndUploadImage, + } = useMessageInputContext(); const { theme: { @@ -53,18 +59,20 @@ export const AttachmentPickerSelectionBar = () => { return ( - - - - - + {hasImagePicker ? ( + + + + + + ) : null} {hasFilePicker ? ( , id: 'File', onPressHandler: pickFile }); } - buttons.push({ icon: , id: 'Camera', onPressHandler: takeAndUploadImage }); + if (hasCameraPicker) { + buttons.push({ + icon: , + id: 'Camera', + onPressHandler: takeAndUploadImage, + }); + } return ( <>