Skip to content

Commit

Permalink
Merge pull request #175 from msalcala11/fixed-height-confirm-line-items
Browse files Browse the repository at this point in the history
Fix confirm screen line-item overlap on resize
  • Loading branch information
JohnathanWhite authored Jul 1, 2022
2 parents 6b30430 + 9d4fa26 commit cc49b96
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import {useFocusEffect, useLinkTo} from '@react-navigation/native';
import {
useFocusEffect,
useLinkTo,
useNavigation,
} from '@react-navigation/native';
import React from 'react';
import {ImageStyle, Linking, StyleProp} from 'react-native';
import ReactAppboy, {ContentCard} from 'react-native-appboy-sdk';
Expand Down Expand Up @@ -75,6 +79,7 @@ const IconStyle: StyleProp<ImageStyle> = {
const AdvertisementCard: React.FC<AdvertisementCardProps> = props => {
const {contentCard, ctaOverride} = props;
const {image, url, openURLInWebView} = contentCard;
const navigation = useNavigation();
const dispatch = useAppDispatch();
const linkTo = useLinkTo();
const theme = useTheme();
Expand Down Expand Up @@ -129,7 +134,10 @@ const AdvertisementCard: React.FC<AdvertisementCardProps> = props => {
if (url.startsWith(APP_DEEPLINK_PREFIX)) {
try {
const path = '/' + url.replace(APP_DEEPLINK_PREFIX, '');

if (path === '/giftcard') {
navigation.navigate('Tabs', {screen: 'Shop'});
return;
}
linkTo(path);

return;
Expand Down
2 changes: 1 addition & 1 deletion src/navigation/wallet/screens/send/confirm/Confirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const Confirm = () => {

return (
<ConfirmContainer>
<ConfirmScrollView>
<ConfirmScrollView contentContainerStyle={{paddingBottom: 50}}>
<DetailsList>
<Header>Summary</Header>
<SendingTo recipient={recipientData} hr />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const PayProConfirm = () => {

return (
<ConfirmContainer>
<ConfirmScrollView>
<ConfirmScrollView contentContainerStyle={{paddingBottom: 50}}>
<DetailsList>
<Header hr>Summary</Header>
<SendingTo
Expand Down
11 changes: 3 additions & 8 deletions src/navigation/wallet/screens/send/confirm/Shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ export interface DetailContainerParams {
}

export const DetailContainer = styled.View<DetailContainerParams>`
min-height: 53px;
min-height: 60px;
padding: 20px 0;
justify-content: center;
${({height}) => (height ? `height: ${height}px;` : '')}
`;

export const PressableDetailContainer = styled.TouchableOpacity<DetailContainerParams>`
min-height: 53px;
min-height: 60px;
padding: 20px 0;
justify-content: center;
${({height}) => (height ? `height: ${height}px;` : '')}
Expand Down Expand Up @@ -373,12 +373,7 @@ export const RemainingTime = ({
}, [computeRemainingTime, expirationTime, setDisableSwipeSendButton]);

return (
<SharedDetailRow
description={t('Expires')}
height={60}
value={remainingTime}
hr
/>
<SharedDetailRow description={t('Expires')} value={remainingTime} hr />
);
};

Expand Down

0 comments on commit cc49b96

Please sign in to comment.