Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix confirm screen line-item overlap on resize #175

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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