BlueWallet/screen/lnd/lndViewAdditionalInvoicePreImage.js

51 lines
1.4 KiB
JavaScript
Raw Normal View History

2023-10-23 21:28:44 -04:00
import { useRoute } from '@react-navigation/native';
2024-05-20 10:54:13 +01:00
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { BlueSpacing20, BlueTextCentered } from '../../BlueComponents';
2024-05-20 10:54:13 +01:00
import CopyTextToClipboard from '../../components/CopyTextToClipboard';
2021-08-26 21:31:36 -04:00
import QRCodeComponent from '../../components/QRCodeComponent';
import SafeArea from '../../components/SafeArea';
2024-05-20 10:54:13 +01:00
import { useTheme } from '../../components/themes';
import loc from '../../loc';
2020-12-25 19:09:53 +03:00
2020-11-27 22:24:20 -05:00
const LNDViewAdditionalInvoicePreImage = () => {
// state = { walletInfo: undefined };
const { colors } = useTheme();
const { preImageData } = useRoute().params;
const stylesHook = StyleSheet.create({
root: {
backgroundColor: colors.elevated,
},
});
return (
<SafeArea style={stylesHook.root}>
2020-11-27 22:24:20 -05:00
<View style={styles.wrapper}>
<BlueTextCentered>{loc.lndViewInvoice.preimage}:</BlueTextCentered>
<BlueSpacing20 />
<View style={styles.qrCodeContainer}>
2021-08-26 21:31:36 -04:00
<QRCodeComponent value={preImageData} size={300} logoSize={90} />
2020-11-27 22:24:20 -05:00
</View>
<BlueSpacing20 />
<CopyTextToClipboard text={preImageData} />
2020-11-27 22:24:20 -05:00
</View>
</SafeArea>
2020-11-27 22:24:20 -05:00
);
};
const styles = StyleSheet.create({
wrapper: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
qrCodeContainer: {
justifyContent: 'center',
alignItems: 'center',
marginHorizontal: 16,
},
});
export default LNDViewAdditionalInvoicePreImage;