(type: AnonymizeType)
| 15 | const [anonymize, setAnonymize] = useState(currentCommunity.anonymize); |
| 16 | |
| 17 | async function onChange(type: AnonymizeType) { |
| 18 | api |
| 19 | .updateAccount({ |
| 20 | accountId: currentCommunity.id, |
| 21 | anonymize: type, |
| 22 | anonymizeUsers: |
| 23 | type === AnonymizeType.MEMBERS || type === AnonymizeType.ALL, |
| 24 | }) |
| 25 | .then((_) => { |
| 26 | Toast.success('Saved successfully!'); |
| 27 | setAnonymize(type); |
| 28 | }) |
| 29 | .catch(() => Toast.error('Something went wrong!')); |
| 30 | } |
| 31 | |
| 32 | return ( |
| 33 | <> |
no test coverage detected