Skip to content

Commit

Permalink
Put 'payment path' and 'add note' btn horizontally
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamkmr04 committed Aug 27, 2024
1 parent cf154c3 commit 76cfdf1
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 deletions views/SendingLightning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ export default class SendingLightning extends React.Component<

const enhancedPath = currentPayment?.enhancedPath;

const isPaymentPathExist =
enhancedPath?.length > 0 && enhancedPath[0][0];

const success = this.successfullySent(TransactionsStore);
const inTransit = this.inTransit(TransactionsStore);
const windowSize = Dimensions.get('window');
Expand Down Expand Up @@ -385,14 +388,20 @@ export default class SendingLightning extends React.Component<
</View>

<View
style={[
styles.buttons,
!noteKey && { marginTop: 14 }
]}
style={{
flexDirection: isPaymentPathExist && 'row',
justifyContent: 'space-between',
width: isPaymentPathExist ? '46%' : '100%',
marginLeft: isPaymentPathExist && 26,
gap: 15,
bottom: 38
}}
>
{enhancedPath?.length > 0 && enhancedPath[0][0] && (
{isPaymentPathExist && (
<Button
title={` View Payment ${
title={`${localeString(
'views.Payment.title'
)} ${
enhancedPath?.length > 1
? `${localeString(
'views.Payment.paths'
Expand Down Expand Up @@ -427,6 +436,14 @@ export default class SendingLightning extends React.Component<
buttonStyle={{ height: 40 }}
/>
)}
</View>

<View
style={[
styles.buttons,
!noteKey && { marginTop: 14 }
]}
>
{(payment_error == 'FAILURE_REASON_NO_ROUTE' ||
payment_error ==
localeString(
Expand Down

0 comments on commit 76cfdf1

Please sign in to comment.