diff --git a/src/core/client/auth/components/ForgotPassword.tsx b/src/core/client/auth/components/ForgotPassword.tsx
index 4c06dcbc4..288887d7f 100644
--- a/src/core/client/auth/components/ForgotPassword.tsx
+++ b/src/core/client/auth/components/ForgotPassword.tsx
@@ -1,6 +1,11 @@
-import * as React from "react";
-import { StatelessComponent } from "react";
-import * as styles from "./SignIn.css";
+import React, { StatelessComponent } from "react";
+import { Field, Form } from "react-final-form";
+
+import {
+ composeValidators,
+ required,
+ validateEmail,
+} from "talk-framework/lib/validation";
import {
Button,
@@ -9,28 +14,57 @@ import {
InputLabel,
TextField,
Typography,
+ ValidationMessage,
} from "talk-ui/components";
+import * as styles from "./ForgotPassword.css";
+
const ForgotPassword: StatelessComponent = props => {
return (
-
-
- Forgot Password
-
-
- Enter your email address below and we will send you a link to reset your
- password.
-
-
- Email Address
-
-
-
-
-
-
+ // TODO (bc) add functionality when Forgot Password is done on the backend
+ // tslint:disable-next-line:no-empty
+
+ )}
+
);
};
diff --git a/src/core/client/auth/components/ResetPassword.tsx b/src/core/client/auth/components/ResetPassword.tsx
index 5f000d091..8500c07db 100644
--- a/src/core/client/auth/components/ResetPassword.tsx
+++ b/src/core/client/auth/components/ResetPassword.tsx
@@ -1,6 +1,12 @@
-import * as React from "react";
-import { StatelessComponent } from "react";
-import * as styles from "./SignIn.css";
+import React, { StatelessComponent } from "react";
+import { Field, Form } from "react-final-form";
+
+import {
+ composeValidators,
+ required,
+ validateEqualPasswords,
+ validatePassword,
+} from "talk-framework/lib/validation";
import {
Button,
@@ -9,29 +15,88 @@ import {
InputLabel,
TextField,
Typography,
+ ValidationMessage,
} from "talk-ui/components";
+import * as styles from "./ResetPassword.css";
+
const ResetPassword: StatelessComponent = props => {
return (
-
-
- Reset Password
-
-
- Password
- Must be at least 8 characters
-
-
-
- Confirm Password
-
-
-
-
-
-
+ // TODO (bc) add functionality when Reset Password is done on the backend
+ // tslint:disable-next-line:no-empty
+
+ )}
+
);
};
diff --git a/src/core/client/auth/components/SignIn.tsx b/src/core/client/auth/components/SignIn.tsx
index 9244aa2af..042233df1 100644
--- a/src/core/client/auth/components/SignIn.tsx
+++ b/src/core/client/auth/components/SignIn.tsx
@@ -1,7 +1,16 @@
import * as React from "react";
import { StatelessComponent } from "react";
+import { Field, Form } from "react-final-form";
+import { OnSubmit } from "talk-framework/lib/form";
import * as styles from "./SignIn.css";
+import {
+ composeValidators,
+ required,
+ validateEmail,
+ validatePassword,
+} from "talk-framework/lib/validation";
+
import {
Button,
Flex,
@@ -9,43 +18,108 @@ import {
InputLabel,
TextField,
Typography,
+ ValidationMessage,
} from "talk-ui/components";
-const SignIn: StatelessComponent = props => {
+interface FormProps {
+ email: string;
+ password: string;
+}
+
+export interface SignInForm {
+ onSubmit: OnSubmit;
+}
+
+const SignIn: StatelessComponent = props => {
return (
-
-
- Sign in to join the conversation
-
-
- Email Address
-
-
-
- Password
-
-
-
-
-
-
-
-
- Don't have an account?
-
-
-
-
+
+ )}
+
);
};
diff --git a/src/core/client/auth/components/SignUp.tsx b/src/core/client/auth/components/SignUp.tsx
index d4c8a7d55..64d632f74 100644
--- a/src/core/client/auth/components/SignUp.tsx
+++ b/src/core/client/auth/components/SignUp.tsx
@@ -153,7 +153,13 @@ const SignUp: StatelessComponent = props => {
-