Skip to content

Commit

Permalink
fix translateX name and cast isDisplayingModal to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed Mar 24, 2021
1 parent 731c787 commit 0db97f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const CustomRootStackNavigator = ({
const {state, navigation, descriptors} = useNavigationBuilder(StackRouter, {
children,
});
const isDisplayingModal = _.find(descriptors, descriptor => descriptor.options.isModal);
const isDisplayingModal = Boolean(_.find(descriptors, descriptor => descriptor.options.isModal));
return (
<>
<StackView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default ({
screen,
},
}) => {
const translateFocused = Animated.multiply(progress.interpolate({
const translateX = Animated.multiply(progress.interpolate({
inputRange: [0, 1],
outputRange: [screen.width, 0],
extrapolate: 'clamp',
Expand All @@ -18,9 +18,7 @@ export default ({
overflow: 'hidden',
},
cardStyle: {
transform: [
{translateX: translateFocused},
],
transform: [{translateX}],
},
overlayStyle: {
opacity: progress.interpolate({
Expand Down

0 comments on commit 0db97f4

Please sign in to comment.