(options?: any)
| 64 | } |
| 65 | |
| 66 | const updateAccount = async (options?: any) => { |
| 67 | const form = document.getElementById('branding-form') as HTMLFormElement; |
| 68 | if (!form) { |
| 69 | return; |
| 70 | } |
| 71 | const googleAnalyticsId = form.googleAnalyticsId?.value; |
| 72 | const brandColor = form.brandColor.value; |
| 73 | const description = form.description.value; |
| 74 | const params = { |
| 75 | description, |
| 76 | brandColor, |
| 77 | googleAnalyticsId, |
| 78 | ...options, |
| 79 | }; |
| 80 | return debouncedUpdateAccount({ |
| 81 | accountId: currentCommunity.id, |
| 82 | ...params, |
| 83 | }).catch((error: any) => { |
| 84 | Toast.error(error.details || error.message || 'Something went wrong!'); |
| 85 | }); |
| 86 | }; |
| 87 | |
| 88 | const onSubmit = async (event: any) => { |
| 89 | event.preventDefault(); |
no test coverage detected