@@ -241,15 +241,15 @@ export function Tokens() {
241
241
</ Card . Header >
242
242
< Card . Body >
243
243
{ tokens . map ( ( token , index ) => {
244
- const isExpired = token . use_once && token . lastUsedAt !== null ;
245
- const statusVariant = isExpired ? "danger" : ( token . use_once ? "success" : "warning" ) ;
246
- const statusText = isExpired ? t ( "tokens.expired " ) : ( token . use_once ? t ( "tokens.use_once" ) : t ( "tokens.reusable" ) ) ;
244
+ const isUsed = token . use_once && token . lastUsedAt !== null ;
245
+ const statusVariant = isUsed ? "danger" : ( token . use_once ? "success" : "warning" ) ;
246
+ const statusText = isUsed ? t ( "tokens.used " ) : ( token . use_once ? t ( "tokens.use_once" ) : t ( "tokens.reusable" ) ) ;
247
247
248
248
return (
249
249
< div key = { index } className = { `token-item ${ index !== tokens . length - 1 ? 'mb-4' : '' } ` } >
250
250
< div className = "d-flex justify-content-between align-items-start mb-2" >
251
251
< div >
252
- < h6 className = { `mb-1 fw-bold ${ isExpired ? 'text-muted' : '' } ` } > { token . name } </ h6 >
252
+ < h6 className = { `mb-1 fw-bold ${ isUsed ? 'text-muted' : '' } ` } > { token . name } </ h6 >
253
253
< small className = "text-muted" >
254
254
{ t ( "tokens.created" ) } : { token . createdAt . toLocaleDateString ( ) } { token . createdAt . toLocaleTimeString ( ) }
255
255
</ small >
@@ -275,9 +275,9 @@ export function Tokens() {
275
275
< Form . Control
276
276
type = "text"
277
277
readOnly
278
- value = { isExpired ? "••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" : token . token }
279
- className = { `${ isExpired ? 'text-muted' : '' } ` }
280
- style = { isExpired ? { fontFamily : 'monospace' } : { } }
278
+ value = { isUsed ? "••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••" : token . token }
279
+ className = { `${ isUsed ? 'text-muted' : '' } ` }
280
+ style = { isUsed ? { fontFamily : 'monospace' } : { } }
281
281
/>
282
282
</ InputGroup >
283
283
< div className = "d-flex flex-wrap gap-2" >
@@ -286,7 +286,7 @@ export function Tokens() {
286
286
size = "sm"
287
287
className = "d-flex align-items-center gap-2"
288
288
onClick = { ( ) => handleCopyToken ( token . token ) }
289
- disabled = { isExpired }
289
+ disabled = { isUsed }
290
290
>
291
291
< Clipboard size = { 16 } />
292
292
{ t ( "tokens.copy" ) }
0 commit comments