File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,11 @@ const App: React.FC = () => {
6767 exact
6868 component = { Settings }
6969 />
70+ < Route
71+ path = { Routes . VERIFY_EMAIL }
72+ exact
73+ component = { VerifyEmail }
74+ />
7075 < Route path = "*" exact component = { NotFound } />
7176 </ Switch >
7277 ) ;
Original file line number Diff line number Diff line change @@ -19,12 +19,19 @@ const { Title, Paragraph } = Typography;
1919
2020type SignupProps = UserAuthenticationReducerState ;
2121
22+ interface SignupFormData extends SignupRequest {
23+ confirmPassword : string ;
24+ }
25+
2226const Signup : React . FC < SignupProps > = ( { tokens } ) => {
2327 const dispatch = useDispatch ( ) ;
2428 const history = useHistory ( ) ;
2529
26- const onFinish = ( values : SignupRequest ) => {
27- dispatch ( signup ( values ) ) ;
30+ const onFinish = ( values : SignupFormData ) => {
31+ // confirmPassword is checked in the form but should not be sent in the request
32+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
33+ const { confirmPassword, ...request } = values ;
34+ dispatch ( signup ( request ) ) ;
2835 } ;
2936
3037 if ( getPrivilegeLevel ( tokens ) !== PrivilegeLevel . NONE ) {
@@ -64,14 +71,6 @@ const Signup: React.FC<SignupProps> = ({ tokens }) => {
6471 < Input />
6572 </ Form . Item >
6673
67- < Form . Item
68- label = "Username"
69- name = "username"
70- rules = { [ { required : true , message : 'Required' } ] }
71- >
72- < Input />
73- </ Form . Item >
74-
7574 < Form . Item
7675 label = "Password"
7776 name = "password"
You can’t perform that action at this time.
0 commit comments