()
| 163 | state.status.kind !== "submitting"; |
| 164 | |
| 165 | const submit = async () => { |
| 166 | if (!canSubmit) return; |
| 167 | setState((s) => ({ ...s, status: { kind: "submitting" } })); |
| 168 | const exit = await doCreate({ |
| 169 | payload: { |
| 170 | owner, |
| 171 | name: ConnectionName.make(id.trim()), |
| 172 | integration, |
| 173 | template, |
| 174 | identityLabel: displayName || id.trim(), |
| 175 | value: state.value.trim(), |
| 176 | }, |
| 177 | reactivityKeys: connectionWriteKeys, |
| 178 | }); |
| 179 | if (Exit.isFailure(exit)) { |
| 180 | setState((s) => ({ |
| 181 | ...s, |
| 182 | status: { |
| 183 | kind: "error", |
| 184 | message: credentialSaveErrorMessage(exit), |
| 185 | }, |
| 186 | })); |
| 187 | return; |
| 188 | } |
| 189 | onCreated(id.trim()); |
| 190 | }; |
| 191 | |
| 192 | const value: SecretFormContextValue = { |
| 193 | state, |
nothing calls this directly
no test coverage detected