🐛 fix(ApiKeysPage): add missing TableHead for 'Id' column to improve table structure

✨ feat(ApiKeysPage): add tooltip and cursor-default to display the full 'Id' value in the table
🐛 fix(ApiKeysPage): fix typo in ConfirmationModal titleHeader from 'Delete User' to 'Delete Key'
✨ feat(ApiKeysPage): add onCloseModal callback to refresh keys after creating a new secret key
This commit is contained in:
Cristhian Zanforlin Lousa 2023-08-17 19:51:40 -03:00
commit 8e662e65f6

View file

@ -129,6 +129,7 @@ export default function ApiKeysPage() {
}
>
<TableRow>
<TableHead className="h-10">Id</TableHead>
<TableHead className="h-10">Name</TableHead>
<TableHead className="h-10">Key</TableHead>
<TableHead className="h-10">Created</TableHead>
@ -148,8 +149,16 @@ export default function ApiKeysPage() {
</TableHeader>
{!loadingKeys && (
<TableBody>
{keysList.current.map((api_keys: ApiKey, index: number) => (
{keysList.current.map(
(api_keys: ApiKey, index: number) => (
<TableRow key={index}>
<TableCell className="truncate py-2">
<ShadTooltip content={api_keys.id}>
<span className="cursor-default">
{api_keys.id}
</span>
</ShadTooltip>
</TableCell>
<TableCell className="truncate py-2">
<ShadTooltip content={api_keys.name}>
<span className="cursor-default">
@ -198,7 +207,8 @@ export default function ApiKeysPage() {
</div>
</TableCell>
</TableRow>
))}
)
)}
</TableBody>
)}
</Table>
@ -212,7 +222,9 @@ export default function ApiKeysPage() {
confirmationText="Create secret key"
icon={"Key"}
data={userId}
onCloseModal={() => {getKeys()}}
onCloseModal={() => {
getKeys();
}}
>
<Button>
<IconComponent name="Plus" className="mr-1 h-5 w-5" />