From 69724f01883d4514ecb0a49ea5a2cad61204bf28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 16 Apr 2026 22:04:24 -0400 Subject: [PATCH] refactor(social): use Modal for AddAccountDialog --- .../components/social/AddAccountDialog.tsx | 136 +++++++----------- 1 file changed, 54 insertions(+), 82 deletions(-) diff --git a/src/renderer/components/social/AddAccountDialog.tsx b/src/renderer/components/social/AddAccountDialog.tsx index e4283da7..1107ba51 100644 --- a/src/renderer/components/social/AddAccountDialog.tsx +++ b/src/renderer/components/social/AddAccountDialog.tsx @@ -1,8 +1,7 @@ import { useState } from "react"; -import { motion } from "framer-motion"; -import { SignIn, X } from "@phosphor-icons/react"; +import { SignIn } from "@phosphor-icons/react"; import type { SocialPlatform } from "@shared/types"; -import { ActionButton } from "../ui"; +import { ActionButton, Modal } from "../ui"; import { platformConfig } from "./social-config"; interface AddAccountDialogProps { @@ -15,91 +14,64 @@ export function AddAccountDialog({ onAddAndLogin, onClose }: AddAccountDialogPro const [requireApproval, setRequireApproval] = useState(true); return ( - - e.stopPropagation()} - > -
-

Add Social Account

- -
- -
-
- -
-
- {(Object.entries(platformConfig) as [SocialPlatform, typeof platformConfig.twitter][]).map(([key, config]) => ( - - ))} -
+ +
+
+ +
+
+ {(Object.entries(platformConfig) as [SocialPlatform, typeof platformConfig.twitter][]).map(([key, config]) => ( + + ))}
+
-
-