🐛 fix(ApiKeysPage): handle case when last_used_at date is invalid to prevent error in moment.js formatting
🎨 style(ApiKeysPage): improve table header className logic for better readability
This commit is contained in:
parent
2151f1e63f
commit
be0c7ce368
1 changed files with 6 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ export default function ApiKeysPage() {
|
|||
<Table className={"table-fixed bg-muted outline-1"}>
|
||||
<TableHeader
|
||||
className={
|
||||
loadingKeys
|
||||
loadingKeys
|
||||
? "hidden"
|
||||
: "table-fixed bg-muted outline-1"
|
||||
}
|
||||
|
|
@ -179,7 +179,11 @@ export default function ApiKeysPage() {
|
|||
<TableCell className="truncate py-2">
|
||||
{moment(api_keys.last_used_at).format(
|
||||
"YYYY-MM-DD HH:mm"
|
||||
)}
|
||||
) === "Invalid date"
|
||||
? "-"
|
||||
: moment(api_keys.last_used_at).format(
|
||||
"YYYY-MM-DD HH:mm"
|
||||
)}
|
||||
</TableCell>
|
||||
<TableCell className="flex w-[100px] py-2 text-right">
|
||||
<div className="flex">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue