Commands, alert improvements

This commit is contained in:
2024-08-20 01:49:52 +02:00
parent 4d12f9a4a4
commit a32d62417a
3 changed files with 11 additions and 5 deletions

View File

@ -22,9 +22,15 @@ function closeNotification(id: string) {
notifications.removeNotification(id)
}
type Notification = {
title?: string
message?: string
}
function setupNotificationListener(connection: any) {
connection.on('notification', (data: { message: string }) => {
connection.on('notification', (data: Notification) => {
notifications.addNotification({
title: data.title,
message: data.message
})
})