feat: track hashtags input usage
Some checks are pending
continuous-integration/drone/push Build is running

This commit is contained in:
Kieran 2024-01-08 10:25:31 +00:00
parent 27210f91ae
commit 9ec27bcea3
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941

View File

@ -173,6 +173,16 @@ export function NoteCreator() {
props ??= {};
props["zap-split"] = true;
}
if (note.hashTags.length > 0) {
props ??= {};
props["hashtags"] = true;
}
if (props) {
props["content-warning"] ??= false;
props["poll"] ??= false;
props["zap-split"] ??= false;
props["hashtags"] ??= false;
}
trackEvent("PostNote", props);
const events = (note.otherEvents ?? []).concat(ev);
@ -355,18 +365,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),
)),
);
}}
/>
@ -435,9 +445,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,
)),
)
}
/>