diff options
| author | Mohamed Bassem <me@mbassem.com> | 2026-01-17 23:33:52 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2026-01-18 14:37:24 +0000 |
| commit | 7b5f63285a7952a57fcfc6bc349869752f689b82 (patch) | |
| tree | fcce99d3edb1f4ac60f75e282abbda65fecaa34f /apps/web/components/settings/DeleteApiKey.tsx | |
| parent | 6094d360cc64806c7e2544c51b6a1f5b1ef140f6 (diff) | |
| download | karakeep-7b5f63285a7952a57fcfc6bc349869752f689b82.tar.zst | |
feat: track api key usage dates
Diffstat (limited to 'apps/web/components/settings/DeleteApiKey.tsx')
| -rw-r--r-- | apps/web/components/settings/DeleteApiKey.tsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/web/components/settings/DeleteApiKey.tsx b/apps/web/components/settings/DeleteApiKey.tsx index 392f3122..b26b40e6 100644 --- a/apps/web/components/settings/DeleteApiKey.tsx +++ b/apps/web/components/settings/DeleteApiKey.tsx @@ -4,10 +4,10 @@ import { useRouter } from "next/navigation"; import { ActionButton } from "@/components/ui/action-button"; import ActionConfirmingDialog from "@/components/ui/action-confirming-dialog"; import { Button } from "@/components/ui/button"; -import { toast } from "@/components/ui/sonner"; import { useTranslation } from "@/lib/i18n/client"; import { api } from "@/lib/trpc"; import { Trash } from "lucide-react"; +import { toast } from "sonner"; export default function DeleteApiKey({ name, @@ -20,9 +20,7 @@ export default function DeleteApiKey({ const router = useRouter(); const mutator = api.apiKeys.revoke.useMutation({ onSuccess: () => { - toast({ - description: "Key was successfully deleted", - }); + toast.success("Key was successfully deleted"); router.refresh(); }, }); @@ -49,8 +47,8 @@ export default function DeleteApiKey({ </ActionButton> )} > - <Button variant="outline"> - <Trash size={18} color="red" /> + <Button variant="ghost" title={t("actions.delete")}> + <Trash size={18} /> </Button> </ActionConfirmingDialog> ); |
