File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ import { Link } from 'react-router-dom' ;
1718import { useTranslation } from 'react-i18next' ;
1819import type { AccountCode } from '@/api/account' ;
1920import type { TDevices } from '@/api/devices' ;
21+ import type { KeysOf } from '@/utils/types' ;
2022import { useSDCard } from '@/hooks/sdcard' ;
2123import { Message } from '@/components/message/message' ;
2224
@@ -32,9 +34,19 @@ export const SDCardWarning = ({
3234 const { t } = useTranslation ( ) ;
3335 const hasCard = useSDCard ( devices , code ? [ code ] : undefined ) ;
3436
37+ const deviceList : KeysOf < TDevices > = Object . keys ( devices ) ;
38+ const firstDevice = deviceList [ 0 ] ;
39+ if ( ! firstDevice ) {
40+ return null ;
41+ }
42+
3543 return (
3644 < Message hidden = { ! hasCard } type = "warning" >
3745 { t ( 'warning.sdcard' ) }
46+ < br />
47+ < Link to = { `/manage-backups/${ firstDevice } ` } >
48+ { t ( 'backup.link' ) }
49+ </ Link >
3850 </ Message >
3951 ) ;
4052} ;
Original file line number Diff line number Diff line change 135135 "description" : " Select <strong>wallet backup file</strong>" ,
136136 "insert" : " Please insert the microSD card to manage backups." ,
137137 "insertButton" : " I have inserted the microSD card" ,
138+ "link" : " Go to manage backups" ,
138139 "list" : " Your microSD card backups" ,
139140 "noBackups" : " There are no backups on this microSD card." ,
140141 "restore" : {
You can’t perform that action at this time.
0 commit comments