complete authentication flow and email verification link implementation #232

Merged
akinwale merged 9 commits from authentication-flow into master 2018-08-16 11:48:35 +02:00
5 changed files with 71 additions and 20 deletions
Showing only changes of commit 3138d04382 - Show all commits

11
app/package-lock.json generated
View file

@ -3969,8 +3969,17 @@
"version": "github:lbryio/lbryinc#8e33473daa56ebe80b12509ac5374c5884efef90",
"from": "github:lbryio/lbryinc#authentication-flow",
"requires": {
"lbry-redux": "github:lbryio/lbry-redux#467e48c77b8004cef738e950bdcc67654748ae9f",
"reselect": "^3.0.0"
},
"dependencies": {
"lbry-redux": {
"version": "github:lbryio/lbry-redux#467e48c77b8004cef738e950bdcc67654748ae9f",
"from": "github:lbryio/lbry-redux#467e48c77b8004cef738e950bdcc67654748ae9f",
"requires": {
"proxy-polyfill": "0.1.6",
"reselect": "^3.0.0"
}
}
}
},
"lcid": {

View file

@ -7,8 +7,6 @@ import {
selectEmailNewErrorMessage,
selectEmailNewIsPending,
selectEmailToVerify,
selectEmailVerifyErrorMessage,
selectEmailVerifyIsPending,
selectIsAuthenticating
} from 'lbryinc';
import FirstRun from './view';
@ -19,8 +17,6 @@ const select = (state) => ({
emailToVerify: selectEmailToVerify(state),
emailNewErrorMessage: selectEmailNewErrorMessage(state),
emailNewPending: selectEmailNewIsPending(state),
emailVerifyErrorMessage: selectEmailVerifyErrorMessage(state),
emailVerifyPending: selectEmailVerifyIsPending(state)
});
const perform = dispatch => ({

View file

@ -8,6 +8,7 @@ import {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
TextInput,
View
} from 'react-native';
import Button from '../../../component/button';
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
import Colors from '../../../styles/colors';
import firstRunStyle from '../../../styles/firstRun';
@ -15,17 +16,25 @@ class EmailCollectPage extends React.PureComponent {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
constructor() {
super();
this.state = {
email: null
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
email: null,
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
authenticationStarted: false,
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
authenticationFailed: false
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
};
}
componentWillReceiveProps(nextProps) {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
const { authenticating, authToken } = this.props;
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
if (this.state.authenticationStarted && !authenticating && authToken === null) {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
this.setState({ authenticationFailed: true, authenticationStarted: false });
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
componentDidMount() {
// call user/new
const { generateAuthToken, authenticating, authToken } = this.props;
if (!authToken && !authenticating) {
Lbry.status().then(info => {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
generateAuthToken(info.installation_id)
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
});
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
this.startAuthenticating(true);
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}
AsyncStorage.getItem('firstRunEmail').then(email => {
@ -35,6 +44,18 @@ class EmailCollectPage extends React.PureComponent {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
});
}
startAuthenticating = (useTimeout) => {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
const { generateAuthToken } = this.props;
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
this.setState({ authenticationStarted: true, authenticationFailed: false });
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
setTimeout(() => {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
Lbry.status().then(info => {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
generateAuthToken(info.installation_id)
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}).catch(error => {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
this.setState({ authenticationFailed: true });
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
});
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}, useTimeout ? 5000 : 0); // if useTimeout is set, wait 5s to give the daemon some time to start
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
handleChangeText = (text) => {
// save the value to the state email
this.setState({ email: text });
@ -42,19 +63,23 @@ class EmailCollectPage extends React.PureComponent {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}
render() {
let authenticationFailed = false;
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
const { authenticating, authToken, onEmailViewLayout, emailToVerify } = this.props;
let content;
if (!authToken || authenticating) {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
if (this.state.authenticationFailed) {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
// Ask the user to try again
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
content = (
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
<View>
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
<Text style={firstRunStyle.paragraph}>The LBRY servers were unreachable at this time. Please check your Internet connection and then restart the app to try again.</Text>
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
</View>
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
);
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
} else if (!authToken || authenticating) {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
content = (
<View>
<ActivityIndicator size="large" color={Colors.White} style={firstRunStyle.waiting} />
<Text style={firstRunStyle.paragraph}>Please wait while we get some things ready...</Text>
</View>
)
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
} else if (authenticationFailed) {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
// Ask the user to try again
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
);
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
} else {
content = (
<View onLayout={onEmailViewLayout}>
@ -69,7 +94,7 @@ class EmailCollectPage extends React.PureComponent {
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
/>
<Text style={firstRunStyle.infoParagraph}>This information is disclosed only to LBRY, Inc. and not to the LBRY network. It is only required to earn LBRY rewards and may be used to sync usage data across devices.</Text>
</View>
)
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
);
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
}
return (

skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`
skhameneh commented 2018-08-16 10:22:29 +02:00 (Migrated from github.com)
Review

No aliases (or resolves) for paths?
*Remove the long relative paths

No aliases (or resolves) for paths? *Remove the long relative paths
skhameneh commented 2018-08-16 10:25:25 +02:00 (Migrated from github.com)
Review

Don’t need a full constructor (see comment above)

Don’t need a full constructor (see comment above)
skhameneh commented 2018-08-16 10:27:30 +02:00 (Migrated from github.com)
Review

This is a legacy lifecycle method, should use getDerivedStateFromProps

This is a legacy lifecycle method, should use `getDerivedStateFromProps`

View file

@ -14,7 +14,6 @@ import Colors from '../../styles/colors';
import Constants from '../../constants';
import WelcomePage from './internal/welcome-page';
import EmailCollectPage from './internal/email-collect-page';
//import EmailVerifyPage from '../internal/email-verify-page';
import firstRunStyle from '../../styles/firstRun';
class FirstRunScreen extends React.PureComponent {
@ -27,8 +26,9 @@ class FirstRunScreen extends React.PureComponent {
super();
this.state = {
currentPage: null,
launchUrl: null,
emailSubmitted: false,
isFirstRun: false,
launchUrl: null,
showBottomContainer: true
};
}
@ -56,6 +56,21 @@ class FirstRunScreen extends React.PureComponent {
}
}
componentWillReceiveProps(nextProps) {
const { emailNewErrorMessage, emailNewPending } = nextProps;
const { notify } = this.props;
if (this.state.emailSubmitted && !emailNewPending) {
this.setState({ emailSubmitted: false });
if (emailNewErrorMessage) {
notify ({ message: String(emailNewErrorMessage), displayType: ['toast']});
} else {
// Request successful. Navigate to discover.
this.closeFinalPage();
}
}
}
launchSplashScreen() {
const { navigation } = this.props;
const resetAction = NavigationActions.reset({
@ -95,9 +110,7 @@ class FirstRunScreen extends React.PureComponent {
}
addUserEmail(email);
// treat as the final page
this.closeFinalPage();
this.setState({ emailSubmitted: true });
});
}

View file

@ -55,6 +55,14 @@ const firstRunStyle = StyleSheet.create({
bottomContainer: {
flex: 1
},
actionButton: {
backgroundColor: Colors.White,
alignSelf: 'center',
fontFamily: 'Metropolis-Regular',
fontSize: 12,
paddingLeft: 16,
paddingRight: 16
},
button: {
alignSelf: 'flex-end',
marginLeft: 32,