chore: formatting
This commit is contained in:
@ -6,7 +6,7 @@ import { unwrap } from "@snort/shared";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Icon } from "./icon";
|
||||
|
||||
export function NotificationsButton({ host, service }: { host: string, service: string }) {
|
||||
export function NotificationsButton({ host, service }: { host: string; service: string }) {
|
||||
const login = useLogin();
|
||||
const publisher = login?.publisher();
|
||||
const [subscribed, setSubscribed] = useState(false);
|
||||
@ -60,7 +60,7 @@ export function NotificationsButton({ host, service }: { host: string, service:
|
||||
setSubscribed(true);
|
||||
}
|
||||
} else {
|
||||
console.warn("No service worker")
|
||||
console.warn("No service worker");
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
@ -73,14 +73,15 @@ export function NotificationsButton({ host, service }: { host: string, service:
|
||||
await api.removeStreamerSubscription(host);
|
||||
setSubscribed(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
isSubscribed().catch(console.error);
|
||||
}, []);
|
||||
|
||||
return <AsyncButton onClick={subscribed ? unsubscribe : subscribe}>
|
||||
return (
|
||||
<AsyncButton onClick={subscribed ? unsubscribe : subscribe}>
|
||||
<Icon name={subscribed ? "bell-off" : "bell-ringing"} />
|
||||
</AsyncButton>
|
||||
);
|
||||
}
|
@ -318,6 +318,9 @@
|
||||
"YagVIe": {
|
||||
"defaultMessage": "{n}p"
|
||||
},
|
||||
"YwzT/0": {
|
||||
"defaultMessage": "Clip title"
|
||||
},
|
||||
"Z8ZOEY": {
|
||||
"defaultMessage": "This method is insecure. We recommend using a {nostrlink}"
|
||||
},
|
||||
|
@ -105,6 +105,7 @@
|
||||
"XgWvGA": "Reactions",
|
||||
"YPh5Nq": "@ {rate}",
|
||||
"YagVIe": "{n}p",
|
||||
"YwzT/0": "Clip title",
|
||||
"Z8ZOEY": "This method is insecure. We recommend using a {nostrlink}",
|
||||
"ZmqxZs": "You can change this later",
|
||||
"Zse7yG": "Raid target",
|
||||
|
Reference in New Issue
Block a user