11import { useContext , useMemo } from "react" ;
22import { useTranslation } from "react-i18next" ;
3- import { ComponentStack } from "@components" ;
3+ import { ComponentStack , Url } from "@components" ;
44import * as ConnectStyled from "../../styled" ;
55import * as S from "./styled" ;
66import {
@@ -10,6 +10,7 @@ import {
1010 SBPHardwareWalletContext
1111} from "@config/SBPHardwareWallet" ;
1212import { useIsScreenSizeMin } from "@hooks" ;
13+ import { hardwareNames } from "@utils" ;
1314
1415export const Empty = ( ) => {
1516 const isLarge = useIsScreenSizeMin ( "large" ) ;
@@ -27,61 +28,83 @@ export const Empty = () => {
2728 < ConnectStyled . Title > { t ( "title" ) } </ ConnectStyled . Title >
2829 < S . SelectHardwareContainer
2930 direction = { isLarge ? "horizontal" : "vertical" }
31+ gapSize = { 26 }
3032 >
31- < S . HardwareContainer
32- disabled = { ! IS_LEDGER_SUPPORTED }
33- onPress = { ( ) => {
34- setHardwareType ( "ledger" ) ;
35- } }
36- >
37- < S . HardwareImage
38- source = { require ( "@assets/images/ledger.png" ) }
39- style = { { aspectRatio : "3/1" , transform : [ { scale : imageRatio } ] } }
33+ < S . HardwareContainerWrapper >
34+ < S . HardwareContainer
35+ disabled = { ! IS_LEDGER_SUPPORTED }
36+ onPress = { ( ) => {
37+ setHardwareType ( "ledger" ) ;
38+ } }
39+ >
40+ < S . HardwareImage
41+ source = { require ( "@assets/images/ledger.png" ) }
42+ style = { { aspectRatio : "3/1" , transform : [ { scale : imageRatio } ] } }
43+ />
44+ { ! IS_LEDGER_SUPPORTED && (
45+ < S . NotSupportedText >
46+ { tRoot ( "common.notSupported" ) }
47+ </ S . NotSupportedText >
48+ ) }
49+ </ S . HardwareContainer >
50+ < Url
51+ as = { S . BuyHardwareText }
52+ title = { `${ t ( "buyHardware" , { hardwareName : hardwareNames [ "ledger" ] } ) } 🇫🇷` }
53+ href = "https://shop.ledger.com/?r=1fbe532b2688& tracker = sbp - signup "
4054 />
41- { ! IS_LEDGER_SUPPORTED && (
42- < S . NotSupportedText >
43- { tRoot ( "common.notSupported" ) }
44- </ S . NotSupportedText >
45- ) }
46- </ S . HardwareContainer >
47- < S . HardwareContainer
48- disabled = { ! IS_BITBOX_SUPPORTED }
49- onPress = { ( ) => {
50- setHardwareType ( "bitbox02" ) ;
51- } }
52- >
53- < S . HardwareImage
54- source = { require ( "@assets/images/bitbox.png" ) }
55- style = { {
56- aspectRatio : "337/83" ,
57- transform : [ { scale : imageRatio * 0.8 } ]
55+ </ S . HardwareContainerWrapper >
56+ < S . HardwareContainerWrapper >
57+ < S . HardwareContainer
58+ disabled = { ! IS_BITBOX_SUPPORTED }
59+ onPress = { ( ) => {
60+ setHardwareType ( "bitbox02" ) ;
5861 } }
62+ >
63+ < S . HardwareImage
64+ source = { require ( "@assets/images/bitbox.png" ) }
65+ style = { {
66+ aspectRatio : "337/83" ,
67+ transform : [ { scale : imageRatio * 0.8 } ]
68+ } }
69+ />
70+ { ! IS_BITBOX_SUPPORTED && (
71+ < S . NotSupportedText >
72+ { tRoot ( "common.notSupported" ) }
73+ </ S . NotSupportedText >
74+ ) }
75+ </ S . HardwareContainer >
76+ < Url
77+ as = { S . BuyHardwareText }
78+ title = { `${ t ( "buyHardware" , { hardwareName : hardwareNames [ "bitbox02" ] } ) } 🇨🇭` }
79+ href = "https://shop.bitbox.swiss/?ref=KerwHOKfOK"
5980 />
60- { ! IS_BITBOX_SUPPORTED && (
61- < S . NotSupportedText >
62- { tRoot ( "common.notSupported" ) }
63- </ S . NotSupportedText >
64- ) }
65- </ S . HardwareContainer >
66- < S . HardwareContainer
67- disabled = { ! IS_TREZOR_SUPPORTED }
68- onPress = { ( ) => {
69- setHardwareType ( "trezor" ) ;
70- } }
71- >
72- < S . HardwareImage
73- source = { require ( "@assets/images/trezor.png" ) }
74- style = { {
75- aspectRatio : "192/49" ,
76- transform : [ { scale : imageRatio * 0.82 } ]
81+ </ S . HardwareContainerWrapper >
82+ < S . HardwareContainerWrapper >
83+ < S . HardwareContainer
84+ disabled = { ! IS_TREZOR_SUPPORTED }
85+ onPress = { ( ) => {
86+ setHardwareType ( "trezor" ) ;
7787 } }
88+ >
89+ < S . HardwareImage
90+ source = { require ( "@assets/images/trezor.png" ) }
91+ style = { {
92+ aspectRatio : "192/49" ,
93+ transform : [ { scale : imageRatio * 0.82 } ]
94+ } }
95+ />
96+ { ! IS_TREZOR_SUPPORTED && (
97+ < S . NotSupportedText >
98+ { tRoot ( "common.notSupported" ) }
99+ </ S . NotSupportedText >
100+ ) }
101+ </ S . HardwareContainer >
102+ < Url
103+ as = { S . BuyHardwareText }
104+ title = { `${ t ( "buyHardware" , { hardwareName : hardwareNames [ "trezor" ] } ) } 🇨🇿` }
105+ href = "https://affil.trezor.io/aff_c?offer_id=235& aff_id = 36313 & source = sbp - signup "
78106 />
79- { ! IS_TREZOR_SUPPORTED && (
80- < S . NotSupportedText >
81- { tRoot ( "common.notSupported" ) }
82- </ S . NotSupportedText >
83- ) }
84- </ S . HardwareContainer >
107+ </ S . HardwareContainerWrapper >
85108 </ S . SelectHardwareContainer >
86109 </ ComponentStack >
87110 ) ;
0 commit comments