Skip to content

Commit 9154fdd

Browse files
committed
fix: move to RN TouchableOpacity instead
1 parent 1d28a1a commit 9154fdd

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
2-
import { StyleSheet, View } from 'react-native';
3-
import { Pressable } from 'react-native-gesture-handler';
2+
import { StyleSheet, TouchableOpacity, View } from 'react-native';
43

54
import { ChannelAvatar } from './ChannelAvatar';
65
import type { ChannelPreviewProps } from './ChannelPreview';
@@ -130,14 +129,14 @@ const ChannelPreviewMessengerWithContext = (props: ChannelPreviewMessengerPropsW
130129
);
131130

132131
return (
133-
<Pressable
132+
<TouchableOpacity
134133
onPress={() => {
135134
if (onSelect) {
136135
onSelect(channel);
137136
}
138137
}}
139-
style={({ pressed }) => [
140-
{ opacity: pressed ? 0.5 : 1 },
138+
style={[
139+
// { opacity: pressed ? 0.5 : 1 },
141140
styles.container,
142141
{ backgroundColor: white_snow, borderBottomColor: border },
143142
container,
@@ -165,7 +164,7 @@ const ChannelPreviewMessengerWithContext = (props: ChannelPreviewMessengerPropsW
165164
/>
166165
</View>
167166
</View>
168-
</Pressable>
167+
</TouchableOpacity>
169168
);
170169
};
171170

package/src/components/MessageInput/MoreOptionsButton.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
2+
import { TouchableOpacity } from 'react-native';
23
import type { GestureResponderEvent } from 'react-native';
3-
import { Pressable } from 'react-native-gesture-handler';
44

55
import { useTheme } from '../../contexts/themeContext/ThemeContext';
66
import { CircleRight } from '../../icons/CircleRight';
@@ -21,14 +21,14 @@ export const MoreOptionsButton = (props: MoreOptionsButtonProps) => {
2121
} = useTheme();
2222

2323
return (
24-
<Pressable
24+
<TouchableOpacity
2525
hitSlop={{ bottom: 15, left: 15, right: 15, top: 15 }}
2626
onPress={handleOnPress}
27-
style={({ pressed }) => [{ opacity: pressed ? 0.5 : 1 }, moreOptionsButton]}
27+
style={[moreOptionsButton]}
2828
testID='more-options-button'
2929
>
3030
<CircleRight pathFill={accent_blue} />
31-
</Pressable>
31+
</TouchableOpacity>
3232
);
3333
};
3434

0 commit comments

Comments
 (0)