@@ -241,15 +241,15 @@ export function Tokens() {
241241 </ Card . Header >
242242 < Card . Body >
243243 { 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" ) ) ;
247247
248248 return (
249249 < div key = { index } className = { `token-item ${ index !== tokens . length - 1 ? 'mb-4' : '' } ` } >
250250 < div className = "d-flex justify-content-between align-items-start mb-2" >
251251 < 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 >
253253 < small className = "text-muted" >
254254 { t ( "tokens.created" ) } : { token . createdAt . toLocaleDateString ( ) } { token . createdAt . toLocaleTimeString ( ) }
255255 </ small >
@@ -275,9 +275,9 @@ export function Tokens() {
275275 < Form . Control
276276 type = "text"
277277 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' } : { } }
281281 />
282282 </ InputGroup >
283283 < div className = "d-flex flex-wrap gap-2" >
@@ -286,7 +286,7 @@ export function Tokens() {
286286 size = "sm"
287287 className = "d-flex align-items-center gap-2"
288288 onClick = { ( ) => handleCopyToken ( token . token ) }
289- disabled = { isExpired }
289+ disabled = { isUsed }
290290 >
291291 < Clipboard size = { 16 } />
292292 { t ( "tokens.copy" ) }
0 commit comments