@@ -53,6 +53,8 @@ const DefaultView: FC<Props> = (props) => {
53
53
useTransactions ( ) ;
54
54
55
55
const isLoading = accountLoading || isLoadingTransactions ;
56
+ const needsKeySetup =
57
+ ! currentAccount ?. hasMnemonic || ! currentAccount ?. isMnemonicBackupDone ;
56
58
57
59
useEffect ( ( ) => {
58
60
loadTransactions ( itemsLimit ) ;
@@ -190,52 +192,52 @@ const DefaultView: FC<Props> = (props) => {
190
192
) }
191
193
192
194
{ ! isLoading && (
193
- < div >
194
- < div className = "flex flex-col mt-4 gap-2 md:gap-3" >
195
- { transactions . length == 0 && (
196
- < IconLinkCard
197
- title = { t ( "default_view.actions.get_started.title" ) }
198
- description = { t (
199
- "default_view.actions.get_started.description"
200
- ) }
201
- icon = { < PopiconsBulbLine className = "w-8 h-8" /> }
202
- onClick = { ( ) => {
203
- utils . openUrl (
204
- "https://guides.getalby.com/user-guide/v/alby-account-and-browser-extension/"
205
- ) ;
206
- } }
207
- />
208
- ) }
209
-
210
- { ! (
211
- currentAccount ?. hasMnemonic &&
212
- currentAccount ?. isMnemonicBackupDone
213
- ) && (
214
- < IconLinkCard
215
- title = { t ( "default_view.actions.setup_keys.title" ) }
216
- description = { t ( "default_view.actions.setup_keys.description" ) }
217
- icon = { < PopiconsKeyLine className = "w-8 h-8" /> }
218
- onClick = { async ( ) => {
219
- openOptions (
220
- `accounts/${ currentAccount ?. id } /secret-key/new`
221
- ) ;
222
- } }
223
- />
224
- ) }
195
+ < div className = "mt-4 flex flex-col gap-4" >
196
+ { ( transactions . length === 0 || needsKeySetup ) && (
197
+ < div className = "flex flex-col gap-2 md:gap-3" >
198
+ { transactions . length === 0 && (
199
+ < IconLinkCard
200
+ title = { t ( "default_view.actions.get_started.title" ) }
201
+ description = { t (
202
+ "default_view.actions.get_started.description"
203
+ ) }
204
+ icon = { < PopiconsBulbLine className = "w-8 h-8" /> }
205
+ onClick = { ( ) => {
206
+ utils . openUrl (
207
+ "https://guides.getalby.com/user-guide/v/alby-account-and-browser-extension/"
208
+ ) ;
209
+ } }
210
+ />
211
+ ) }
212
+ { needsKeySetup && (
213
+ < IconLinkCard
214
+ title = { t ( "default_view.actions.setup_keys.title" ) }
215
+ description = { t (
216
+ "default_view.actions.setup_keys.description"
217
+ ) }
218
+ icon = { < PopiconsKeyLine className = "w-8 h-8" /> }
219
+ onClick = { async ( ) => {
220
+ openOptions (
221
+ `accounts/${ currentAccount ?. id } /secret-key/new`
222
+ ) ;
223
+ } }
224
+ />
225
+ ) }
226
+ { transactions . length === 0 && (
227
+ < IconLinkCard
228
+ title = { t ( "default_view.actions.receive_bitcoin.title" ) }
229
+ description = { t (
230
+ "default_view.actions.receive_bitcoin.description"
231
+ ) }
232
+ icon = { < PopiconsArrowDownLine className = "w-8 h-8" /> }
233
+ onClick = { ( ) => {
234
+ navigate ( "/receive" ) ;
235
+ } }
236
+ />
237
+ ) }
238
+ </ div >
239
+ ) }
225
240
226
- { transactions . length == 0 && (
227
- < IconLinkCard
228
- title = { t ( "default_view.actions.receive_bitcoin.title" ) }
229
- description = { t (
230
- "default_view.actions.receive_bitcoin.description"
231
- ) }
232
- icon = { < PopiconsArrowDownLine className = "w-8 h-8" /> }
233
- onClick = { ( ) => {
234
- navigate ( "/receive" ) ;
235
- } }
236
- />
237
- ) }
238
- </ div >
239
241
< TransactionsTable
240
242
transactions = { transactions }
241
243
loading = { isLoading }
0 commit comments