From 1fb3e59824d9e8d60734192a0603a35d924719f7 Mon Sep 17 00:00:00 2001 From: Wikid82 Date: Mon, 24 Nov 2025 00:51:08 +0000 Subject: [PATCH] refactor: Clean up formatting and spacing in Notifications and Uptime components --- frontend/src/pages/Notifications.tsx | 54 ++++++++++++++-------------- frontend/src/pages/Uptime.tsx | 6 ++-- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/frontend/src/pages/Notifications.tsx b/frontend/src/pages/Notifications.tsx index 73a87ea5..fdccb419 100644 --- a/frontend/src/pages/Notifications.tsx +++ b/frontend/src/pages/Notifications.tsx @@ -6,15 +6,15 @@ import { Button } from '../components/ui/Button'; import { Bell, Plus, Trash2, Edit2, Send, Check, X, Loader2 } from 'lucide-react'; import { useForm } from 'react-hook-form'; -const ProviderForm: React.FC<{ - initialData?: Partial; - onClose: () => void; +const ProviderForm: React.FC<{ + initialData?: Partial; + onClose: () => void; onSubmit: (data: any) => void; }> = ({ initialData, onClose, onSubmit }) => { const { register, handleSubmit, watch, setValue, formState: { errors } } = useForm({ - defaultValues: initialData || { - type: 'discord', - enabled: true, + defaultValues: initialData || { + type: 'discord', + enabled: true, config: '', notify_proxy_hosts: true, notify_remote_servers: true, @@ -25,7 +25,7 @@ const ProviderForm: React.FC<{ }); const [testStatus, setTestStatus] = useState<'idle' | 'success' | 'error'>('idle'); - + const testMutation = useMutation({ mutationFn: testProvider, onSuccess: () => { @@ -160,16 +160,16 @@ const ProviderForm: React.FC<{
- @@ -235,9 +235,9 @@ const Notifications: React.FC = () => { {isAdding && (

Add New Provider

- setIsAdding(false)} - onSubmit={(data) => createMutation.mutate(data)} + setIsAdding(false)} + onSubmit={(data) => createMutation.mutate(data)} />
)} @@ -246,10 +246,10 @@ const Notifications: React.FC = () => { {providers?.map((provider) => ( {editingId === provider.id ? ( - setEditingId(null)} - onSubmit={(data) => updateMutation.mutate({ id: provider.id, data })} + setEditingId(null)} + onSubmit={(data) => updateMutation.mutate({ id: provider.id, data })} /> ) : (
@@ -267,11 +267,11 @@ const Notifications: React.FC = () => {
- +
- -