HomePhabricator
Diffusion Comm 232d032138c0

[lib/native] introduce useIsKeyserverURLValid hook

Description

[lib/native] introduce useIsKeyserverURLValid hook

Summary:
To validate that the keyserver url the user inputted into the add keyserver input exists we should call the getVersion endpoint. The logic for this actually already exists in the KeyserverSelection component in the new registation flow. This diff factors out the shared logic into a seperate hook called useIsKeyserverURLValid.

Linear task: https://linear.app/comm/issue/ENG-5337/factor-out-shared-validation-logic-in-the-onsubmit-callback-in

Depends on D9665

Test Plan: Followed the test plan in D8198 and made sure that there were no regressions

Reviewers: inka, rohan, michal, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek, wyilio

Differential Revision: https://phab.comm.dev/D9666

Details

Provenance
ginsuAuthored on Oct 31 2023, 5:43 PM
Reviewer
ashoat
Differential Revision
D9666: [lib/native] introduce useIsKeyserverURLValid hook
Parents
rCOMM62df5d4a4754: [electron-update-server] codeVersion -> 2.0
Branches
Unknown
Tags
Unknown