()
| 124 | setOpenCreateModal3(false) |
| 125 | } |
| 126 | const handleConfirm = async () => { |
| 127 | form.validateFields().then(async () => { |
| 128 | try { |
| 129 | const credentials = form.getFieldsValue() |
| 130 | const params = { |
| 131 | name: bundleName, |
| 132 | credentials, |
| 133 | bundle_id: bundleId, |
| 134 | } |
| 135 | setConfirmLoading(true) |
| 136 | await createPlugin(params) |
| 137 | const params1 = { |
| 138 | limit: 100, |
| 139 | offset: 0, |
| 140 | lang: 'en' |
| 141 | } |
| 142 | await getBundleList(params1) |
| 143 | handleConfirmRequest() |
| 144 | setOpenCreateModal3(false) |
| 145 | setOpenCreateModal2(false) |
| 146 | handleCloseModal() |
| 147 | |
| 148 | toast.success('Creation successful!') |
| 149 | } catch (error) { |
| 150 | const apiError = error as ApiErrorResponse; |
| 151 | const errorMessage: string = apiError.response.data.error.message; |
| 152 | toast.error(errorMessage) |
| 153 | } finally { |
| 154 | setConfirmLoading(false) |
| 155 | } |
| 156 | }) |
| 157 | |
| 158 | } |
| 159 | const handleValuesChange = (changedValues: object) => { |
| 160 | form.validateFields(Object.keys(changedValues)); |
| 161 | }; |
nothing calls this directly
no test coverage detected