upd: tambah notifikasi success/error saat simpan Settings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,7 @@ import {
|
||||
TbUserSearch,
|
||||
TbUsers,
|
||||
} from 'react-icons/tb'
|
||||
import { notifications } from '@mantine/notifications'
|
||||
import { type Role, useLogout, useSession } from '@/frontend/hooks/useAuth'
|
||||
import { usePresence } from '@/frontend/hooks/usePresence'
|
||||
|
||||
@@ -1517,6 +1518,10 @@ function SettingsPanel() {
|
||||
qc.invalidateQueries({ queryKey: ['admin', 'config'] })
|
||||
setSaved(true)
|
||||
setTimeout(() => setSaved(false), 2000)
|
||||
notifications.show({ color: 'green', title: 'Tersimpan', message: 'Konfigurasi berhasil disimpan.' })
|
||||
},
|
||||
onError: () => {
|
||||
notifications.show({ color: 'red', title: 'Gagal', message: 'Terjadi kesalahan saat menyimpan konfigurasi.' })
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user