diff --git a/src/App.css b/src/App.css
index 666856f..86d4fd1 100644
--- a/src/App.css
+++ b/src/App.css
@@ -23,6 +23,10 @@ h2 {
font-weight: 25;
}
+.centre{
+ font-family: cursive;
+ padding: 100px;
+}
.SignIn-Box, .signup-box {
background: #12494f;
box-shadow: 9px 9px 10px 1px rgba(12, 46, 49, 0.76);
@@ -30,6 +34,13 @@ h2 {
padding-top: 1em;
}
+.Verify-Box {
+ background: #12494f;
+ box-shadow: 9px 9px 10px 1px rgba(12, 46, 49, 0.76);
+ padding: 3em;
+ padding-top: 1em;
+}
+
.signin-form, .signup-form {
padding-top: 2em;
width: 30%;
@@ -56,9 +67,9 @@ h2 {
.email-input, .password-input, .name-input{
outline: none;
- font-size: 2em;
+ font-size: 1.2em;
color: #e8e8e8;
- padding: .8em 1em;
+ padding: 1.6em 1em;
margin: auto;
border: none;
-webkit-appearance: none;
diff --git a/src/components/SignIn.jsx b/src/components/SignIn.jsx
index 2452fba..480d5d1 100644
--- a/src/components/SignIn.jsx
+++ b/src/components/SignIn.jsx
@@ -27,6 +27,7 @@ import { Label } from 'bloomer/lib/elements/Form/Label';
console.log(error);
this.setState({error});
})
+ window.location.reload();
}
resetemail()
@@ -121,13 +122,8 @@ import { Label } from 'bloomer/lib/elements/Form/Label';
>
SIGN IN
-
+
+ this.resetemail()} className = "link">Forgot Password
Sign In Using :
diff --git a/src/components/emailverify.jsx b/src/components/emailverify.jsx
new file mode 100644
index 0000000..f49a7b0
--- /dev/null
+++ b/src/components/emailverify.jsx
@@ -0,0 +1,60 @@
+import React,{Component} from 'react';
+import { Box } from 'bloomer';
+import ReactDOM from 'react-dom';
+import { createStore } from 'redux';
+import { Provider } from 'react-redux';
+import { Router, Route, browserHistory, hashHistory } from 'react-router';
+import { firebaseApp } from '../firebase';
+import { logUser } from '../actions/index';
+import reducer from '../reducers';
+import '../App.css';
+import App from './App';
+import SignIn from './SignIn';
+import SignUp from './SignUp';
+
+
+class emailverify extends Component {
+ constructor(props) {
+ super(props);
+
+const store = createStore(reducer);
+var user = firebaseApp.auth().currentUser;
+firebaseApp.auth().onAuthStateChanged(user => {
+ if(user) {
+ console.log(user.emailVerified);
+ const { displayName } = user;
+ const email = displayName;
+ store.dispatch(logUser(email));
+ if(user.emailVerified) {
+
+ window.location.href('/app');
+ }
+ }
+ else {
+ window.location.reload();
+ }
+});
+
+ }
+
+
+
+render(){
+ return (
+
+
+ You have not verified your email yet.Sorry folks.Kindly check your inbox and verify for account activation
+
+
+
+ )
+}
+}
+
+export default emailverify;
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 8e9c9ff..53919ca 100644
--- a/src/index.js
+++ b/src/index.js
@@ -10,6 +10,7 @@ import reducer from './reducers';
import App from './components/App';
import SignIn from './components/SignIn';
import SignUp from './components/SignUp';
+import emailverify from './components/emailverify';
import '../node_modules/font-awesome/css/font-awesome.min.css';
const store = createStore(reducer);
@@ -23,11 +24,8 @@ firebaseApp.auth().onAuthStateChanged(user => {
if(user.emailVerified) {
hashHistory.push('/app');
} else {
- alert('Please check your inbox for a verification e-mail and follow the instructions');
- user.sendEmailVerification().then(function() {
- hashHistory.replace('/signin');
- });
- }
+ hashHistory.replace('/emailverify');
+ }
}
else {
hashHistory.replace('/signin');
@@ -38,6 +36,7 @@ ReactDOM.render(
+