Skip to content

Commit

Permalink
fix: v4 card onPress crash when using RN 0.73 (#4248)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaitoAnderson authored Jan 2, 2024
1 parent 8a3e169 commit 0752cc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
TouchableWithoutFeedback,
View,
ViewStyle,
Platform,
} from 'react-native';
import color from 'color';
import { white, black } from '../../styles/colors';
Expand Down Expand Up @@ -165,7 +166,7 @@ const Card = ({
Animated.timing(elevation, {
toValue: isPressTypeIn ? 8 : cardElevation,
duration: animationDuration,
useNativeDriver: true,
useNativeDriver: Platform.constants.reactNativeVersion.minor <= 72,
}).start();
}
};
Expand Down

0 comments on commit 0752cc7

Please sign in to comment.