Skip to content

Commit

Permalink
fix: remove unnecessary check in the stack navigator (#11747)
Browse files Browse the repository at this point in the history
Fix post #11733 

Please provide enough information so that others can review your pull
request.

**Motivation**

Explain the **motivation** for making this change. What existing problem
does the pull request solve?

If this pull request addresses an existing issue, link to the issue. If
an issue is not present, describe the issue here.

**Test plan**

Describe the **steps to test this change** so that a reviewer can verify
it. Provide screenshots or videos if the change affects UI.

The change must pass lint, typescript and tests.
  • Loading branch information
osdnk committed Dec 13, 2023
1 parent 6e6290e commit 02ec21b
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions packages/stack/src/views/Stack/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -505,21 +505,20 @@ export class Card extends React.Component<Props> {
const { containerStyle, cardStyle, overlayStyle, shadowStyle } =
interpolatedStyle;

const handleGestureEvent =
gestureEnabled && gesture
? Animated.event(
[
{
nativeEvent:
gestureDirection === 'vertical' ||
gestureDirection === 'vertical-inverted'
? { translationY: gesture }
: { translationX: gesture },
},
],
{ useNativeDriver }
)
: undefined;
const handleGestureEvent = gestureEnabled
? Animated.event(
[
{
nativeEvent:
gestureDirection === 'vertical' ||
gestureDirection === 'vertical-inverted'
? { translationY: gesture }
: { translationX: gesture },
},
],
{ useNativeDriver }
)
: undefined;

const { backgroundColor } = StyleSheet.flatten(contentStyle || {});
const isTransparent =
Expand Down

0 comments on commit 02ec21b

Please sign in to comment.