We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b64b879 commit 0aeb61aCopy full SHA for 0aeb61a
src/components/userLookup.tsx
@@ -661,15 +661,13 @@ const AddNote = (props: { player: Player }) => {
661
confidential: confidential ? "true" : "false",
662
}),
663
}).then((response) => {
664
- response.text().then((response) => {
665
- refetch?.updateUser({ userCkey: ckey });
666
- setAdding(false);
667
- if (response) {
668
- global?.updateAndShowToast(`Added note to ${ckey}.`);
669
- } else {
670
- global?.updateAndShowToast(`Failed to add note.`);
671
- }
672
- });
+ refetch?.updateUser({ userCkey: ckey });
+ setAdding(false);
+ if (response.status == 202) {
+ global?.updateAndShowToast(`Added note to ${ckey}.`);
+ } else {
+ global?.updateAndShowToast(`Failed to add note.`);
+ }
673
});
674
};
675
0 commit comments