chore: formatting

This commit is contained in:
2023-12-10 17:41:25 +00:00
parent a1e9df8254
commit d00f8b0d85
3 changed files with 20 additions and 19 deletions

View File

@ -158,7 +158,7 @@ export function NoteCreator() {
async function sendNote() {
const ev = await buildNote();
if (ev) {
trackEvent("PostNote")
trackEvent("PostNote");
if (ev.tags.find(a => a[0] === "content-warning")) {
trackEvent("PostNote:WithContentWarning");
}
@ -352,18 +352,18 @@ export function NoteCreator() {
onChange={e => {
note.update(
v =>
(v.selectedCustomRelays =
// set false if all relays selected
e.target.checked &&
(v.selectedCustomRelays =
// set false if all relays selected
e.target.checked &&
note.selectedCustomRelays &&
note.selectedCustomRelays.length == a.length - 1
? undefined
: // otherwise return selectedCustomRelays with target relay added / removed
a.filter(el =>
el === r
? e.target.checked
: !note.selectedCustomRelays || note.selectedCustomRelays.includes(el),
)),
? undefined
: // otherwise return selectedCustomRelays with target relay added / removed
a.filter(el =>
el === r
? e.target.checked
: !note.selectedCustomRelays || note.selectedCustomRelays.includes(el),
)),
);
}}
/>
@ -432,9 +432,9 @@ export function NoteCreator() {
onChange={e =>
note.update(
v =>
(v.zapSplits = arr.map((vv, ii) =>
ii === i ? { ...vv, weight: Number(e.target.value) } : vv,
)),
(v.zapSplits = arr.map((vv, ii) =>
ii === i ? { ...vv, weight: Number(e.target.value) } : vv,
)),
)
}
/>