Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: remove duplicate close button in ProfileDetailsModal

Boschda54d54f60e9
diff --git a/dashboard/src/components/atoms/Modal.tsx b/dashboard/src/components/atoms/Modal.tsx
index f6a13aab..cc806b30 100644
--- a/dashboard/src/components/atoms/Modal.tsx
+++ b/dashboard/src/components/atoms/Modal.tsx
@@ -41,7 +41,7 @@ export default function Modal({ open, onClose, title, children, actions, wide }:
<h3 className="mb-4 text-lg font-semibold text-text-primary">{title}</h3>
<div className="text-sm text-text-secondary">{children}</div>
<div className="mt-5 flex justify-end gap-2">
- {actions || (
+ {actions ?? (
<Button variant="secondary" onClick={onClose}>
Close
</Button>
diff --git a/dashboard/src/components/molecules/ProfileDetailsModal.tsx b/dashboard/src/components/molecules/ProfileDetailsModal.tsx
index 0fa370cc..4f753bb1 100644
--- a/dashboard/src/components/molecules/ProfileDetailsModal.tsx
+++ b/dashboard/src/components/molecules/ProfileDetailsModal.tsx
@@ -96,7 +96,27 @@ export default function ProfileDetailsModal({
}`
return (
- <Modal open={!!profile} onClose={onClose} title={profile.name} wide>
+ <Modal
+ open={!!profile}
+ onClose={onClose}
+ title={profile.name}
+ wide
+ actions={
+ <div className="flex w-full items-center justify-between">
+ <Button variant="danger" onClick={onDelete}>
+ Delete
+ </Button>
+ <div className="flex gap-2">
+ <Button variant="primary" onClick={handleSave}>
+ Save
+ </Button>
+ <Button variant="secondary" onClick={onClose}>
+ Close
+ </Button>
+ </div>
+ </div>
+ }
+ >
{/* Tabs */}
<div className="-mx-4 -mt-2 mb-4 flex border-b border-border-subtle px-4">
<button className={tabClasses('profile')} onClick={() => setActiveTab('profile')}>
@@ -278,20 +298,6 @@ export default function ProfileDetailsModal({
)}
</div>
- {/* Footer */}
- <div className="-mx-4 -mb-4 mt-4 flex items-center justify-between border-t border-border-subtle px-4 pt-4">
- <Button variant="danger" onClick={onDelete}>
- Delete
- </Button>
- <div className="flex gap-2">
- <Button variant="primary" onClick={handleSave}>
- Save
- </Button>
- <Button variant="secondary" onClick={onClose}>
- Close
- </Button>
- </div>
- </div>
</Modal>
)
}