From 9df0f44132e19be9fc975543924aef81b04e9e0b Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Sat, 23 Aug 2025 18:05:59 +0300
Subject: fix(web): Fix hydration errors in add api key page

---
 apps/web/components/settings/AddApiKey.tsx | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

(limited to 'apps/web/components/settings/AddApiKey.tsx')

diff --git a/apps/web/components/settings/AddApiKey.tsx b/apps/web/components/settings/AddApiKey.tsx
index b41701ba..326da229 100644
--- a/apps/web/components/settings/AddApiKey.tsx
+++ b/apps/web/components/settings/AddApiKey.tsx
@@ -10,7 +10,6 @@ import {
   Dialog,
   DialogClose,
   DialogContent,
-  DialogDescription,
   DialogFooter,
   DialogHeader,
   DialogTitle,
@@ -38,7 +37,7 @@ function ApiKeySuccess({ apiKey }: { apiKey: string }) {
   const { t } = useTranslation();
   return (
     <div>
-      <div className="py-4">
+      <div className="py-4 text-sm text-muted-foreground">
         {t("settings.api_keys.key_success_please_copy")}
       </div>
       <div className="flex space-x-2 pt-2">
@@ -117,11 +116,7 @@ function AddApiKeyForm({ onSuccess }: { onSuccess: (key: string) => void }) {
             );
           }}
         />
-        <ActionButton
-          className="h-full"
-          type="submit"
-          loading={mutator.isPending}
-        >
+        <ActionButton type="submit" loading={mutator.isPending}>
           {t("actions.create")}
         </ActionButton>
       </form>
@@ -148,14 +143,12 @@ export default function AddApiKey() {
               ? t("settings.api_keys.key_success")
               : t("settings.api_keys.new_api_key")}
           </DialogTitle>
-          <DialogDescription>
-            {key ? (
-              <ApiKeySuccess apiKey={key} />
-            ) : (
-              <AddApiKeyForm onSuccess={setKey} />
-            )}
-          </DialogDescription>
         </DialogHeader>
+        {key ? (
+          <ApiKeySuccess apiKey={key} />
+        ) : (
+          <AddApiKeyForm onSuccess={setKey} />
+        )}
         <DialogFooter className="sm:justify-end">
           <DialogClose asChild>
             <Button
-- 
cgit v1.2.3-70-g09d2

