mirror of
https://github.com/aljazceru/goose.git
synced 2026-01-02 22:14:26 +01:00
ui: make modals auto-close (#1879)
This commit is contained in:
@@ -108,7 +108,12 @@ export default function ExtensionModal({
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
onClick={() => onDelete && onDelete(formData.name)}
|
||||
onClick={() => {
|
||||
if (onDelete) {
|
||||
onDelete(formData.name);
|
||||
onClose(); // Add this line to close the modal after deletion
|
||||
}
|
||||
}}
|
||||
className="w-full h-[60px] rounded-none border-b border-borderSubtle bg-transparent hover:bg-red-900/20 text-red-500 font-medium text-md"
|
||||
>
|
||||
<Trash2 className="h-4 w-4 mr-2" /> Confirm Delete
|
||||
|
||||
@@ -45,6 +45,7 @@ export const AddModelModal = ({ onClose, setView }: AddModelModalProps) => {
|
||||
|
||||
const changeModel = async () => {
|
||||
await switchModel({ model: model, provider: provider, writeToConfig: upsert });
|
||||
onClose(); // Add this line to close the modal after changing the model
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user