mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-13 06:35:24 +03:00
Show errors in UI
This commit is contained in:
parent
61f4bcdcdf
commit
273e7c07d1
@ -74,9 +74,18 @@ export default function NotificationView({
|
|||||||
applicationServerKey: publicKey,
|
applicationServerKey: publicKey,
|
||||||
})
|
})
|
||||||
.then((pushSubscription) => {
|
.then((pushSubscription) => {
|
||||||
axios.post("notifications/register", {
|
axios
|
||||||
sub: pushSubscription,
|
.post("notifications/register", {
|
||||||
});
|
sub: pushSubscription,
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
toast.error("Failed to save notification registration.", {
|
||||||
|
position: "top-center",
|
||||||
|
});
|
||||||
|
pushSubscription.unsubscribe();
|
||||||
|
registration.unregister();
|
||||||
|
setRegistration(null);
|
||||||
|
});
|
||||||
toast.success(
|
toast.success(
|
||||||
"Successfully registered for notifications. Restart to start receiving notifications.",
|
"Successfully registered for notifications. Restart to start receiving notifications.",
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user