2025-02-25 21:36:32 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import Confirm from "@lib/components/Confirm.svelte"
|
2025-08-21 22:01:31 +00:00
|
|
|
import type {Alert} from "@app/core/state"
|
2025-09-09 16:54:08 +00:00
|
|
|
import {deleteAlert} from "@app/core/commands"
|
2025-08-21 22:01:31 +00:00
|
|
|
import {pushToast} from "@app/util/toast"
|
2025-02-25 21:36:32 +00:00
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
alert: Alert
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {alert}: Props = $props()
|
|
|
|
|
|
|
|
|
|
const confirm = () => {
|
2025-09-09 16:54:08 +00:00
|
|
|
deleteAlert(alert)
|
2025-02-25 21:36:32 +00:00
|
|
|
pushToast({message: "Your alert has been deleted!"})
|
|
|
|
|
history.back()
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<Confirm {confirm} message="You'll no longer receive messages for this alert." />
|