chore: formatting

This commit is contained in:
2023-12-18 12:21:06 +00:00
parent fec6f48bce
commit 4e947dbaa6
3 changed files with 70 additions and 65 deletions

View File

@ -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>
);
}

View File

@ -318,6 +318,9 @@
"YagVIe": {
"defaultMessage": "{n}p"
},
"YwzT/0": {
"defaultMessage": "Clip title"
},
"Z8ZOEY": {
"defaultMessage": "This method is insecure. We recommend using a {nostrlink}"
},

View File

@ -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",