Skip to content

Commit 9b44c74

Browse files
committed
Disable ImageView for web
1 parent 1aeec3a commit 9b44c74

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@
7474
"!**/index.{ts,tsx}",
7575
"!**/styles.{ts,tsx}",
7676
"!**/types.{ts,tsx}",
77-
"!**/*.d.ts"
77+
"!**/*.d.ts",
78+
"!**/ImageView.android.ts",
79+
"!**/ImageView.ios.ts",
80+
"!**/ImageView.tsx"
7881
],
7982
"coverageThreshold": {
8083
"global": {

src/components/Chat/Chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
Text,
1818
View,
1919
} from 'react-native'
20-
import ImageView from 'react-native-image-viewing'
2120
import { useSafeAreaInsets } from 'react-native-safe-area-context'
2221

2322
import { usePrevious } from '../../hooks'
@@ -35,6 +34,7 @@ import {
3534
import { CircularActivityIndicator } from '../CircularActivityIndicator'
3635
import { Input, InputAdditionalProps, InputTopLevelProps } from '../Input'
3736
import { Message, MessageTopLevelProps } from '../Message'
37+
import ImageView from './ImageView'
3838
import styles from './styles'
3939

4040
// Untestable
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ImageView from 'react-native-image-viewing'
2+
3+
export default ImageView
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import ImageView from 'react-native-image-viewing'
2+
3+
export default ImageView

src/components/Chat/ImageView.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as React from 'react'
2+
import { ImageRequireSource, ImageURISource, View } from 'react-native'
3+
4+
interface Props {
5+
imageIndex: number
6+
images: Array<ImageURISource | ImageRequireSource>
7+
onRequestClose: () => void
8+
visible: boolean
9+
}
10+
11+
const ImageView = (_: Props) => {
12+
return <View />
13+
}
14+
15+
export default ImageView

0 commit comments

Comments
 (0)