Rename render function props from `Route` (#7657)

The props parameter from the `Route` render function has been renamed
to `routeProps` to avoid confusion with the component props.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent e060e4c71f
commit b34c663712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      ui/app/pages/first-time-flow/create-password/create-password.component.js
  2. 16
      ui/app/pages/first-time-flow/first-time-flow.component.js
  3. 12
      ui/app/pages/first-time-flow/seed-phrase/seed-phrase.component.js

@ -36,9 +36,9 @@ export default class CreatePassword extends PureComponent {
<Route <Route
exact exact
path={INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE} path={INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE}
render={props => ( render={routeProps => (
<ImportWithSeedPhrase <ImportWithSeedPhrase
{ ...props } { ...routeProps }
onSubmit={onCreateNewAccountFromSeed} onSubmit={onCreateNewAccountFromSeed}
/> />
)} )}
@ -46,9 +46,9 @@ export default class CreatePassword extends PureComponent {
<Route <Route
exact exact
path={INITIALIZE_CREATE_PASSWORD_ROUTE} path={INITIALIZE_CREATE_PASSWORD_ROUTE}
render={props => ( render={routeProps => (
<NewAccount <NewAccount
{ ...props } { ...routeProps }
onSubmit={onCreateNewAccount} onSubmit={onCreateNewAccount}
/> />
)} )}

@ -107,9 +107,9 @@ export default class FirstTimeFlow extends PureComponent {
<Switch> <Switch>
<Route <Route
path={INITIALIZE_SEED_PHRASE_ROUTE} path={INITIALIZE_SEED_PHRASE_ROUTE}
render={props => ( render={routeProps => (
<SeedPhrase <SeedPhrase
{ ...props } { ...routeProps }
seedPhrase={seedPhrase} seedPhrase={seedPhrase}
verifySeedPhrase={verifySeedPhrase} verifySeedPhrase={verifySeedPhrase}
/> />
@ -117,9 +117,9 @@ export default class FirstTimeFlow extends PureComponent {
/> />
<Route <Route
path={INITIALIZE_BACKUP_SEED_PHRASE_ROUTE} path={INITIALIZE_BACKUP_SEED_PHRASE_ROUTE}
render={props => ( render={routeProps => (
<SeedPhrase <SeedPhrase
{ ...props } { ...routeProps }
seedPhrase={seedPhrase} seedPhrase={seedPhrase}
verifySeedPhrase={verifySeedPhrase} verifySeedPhrase={verifySeedPhrase}
/> />
@ -127,9 +127,9 @@ export default class FirstTimeFlow extends PureComponent {
/> />
<Route <Route
path={INITIALIZE_CREATE_PASSWORD_ROUTE} path={INITIALIZE_CREATE_PASSWORD_ROUTE}
render={props => ( render={routeProps => (
<CreatePassword <CreatePassword
{ ...props } { ...routeProps }
isImportedKeyring={isImportedKeyring} isImportedKeyring={isImportedKeyring}
onCreateNewAccount={this.handleCreateNewAccount} onCreateNewAccount={this.handleCreateNewAccount}
onCreateNewAccountFromSeed={this.handleImportWithSeedPhrase} onCreateNewAccountFromSeed={this.handleImportWithSeedPhrase}
@ -142,9 +142,9 @@ export default class FirstTimeFlow extends PureComponent {
/> />
<Route <Route
path={INITIALIZE_UNLOCK_ROUTE} path={INITIALIZE_UNLOCK_ROUTE}
render={props => ( render={routeProps => (
<Unlock <Unlock
{ ...props } { ...routeProps }
onSubmit={this.handleUnlock} onSubmit={this.handleUnlock}
/> />
)} )}

@ -52,9 +52,9 @@ export default class SeedPhrase extends PureComponent {
<Route <Route
exact exact
path={INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE} path={INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE}
render={props => ( render={routeProps => (
<ConfirmSeedPhrase <ConfirmSeedPhrase
{ ...props } { ...routeProps }
seedPhrase={seedPhrase || verifiedSeedPhrase} seedPhrase={seedPhrase || verifiedSeedPhrase}
/> />
)} )}
@ -62,9 +62,9 @@ export default class SeedPhrase extends PureComponent {
<Route <Route
exact exact
path={INITIALIZE_SEED_PHRASE_ROUTE} path={INITIALIZE_SEED_PHRASE_ROUTE}
render={props => ( render={routeProps => (
<RevealSeedPhrase <RevealSeedPhrase
{ ...props } { ...routeProps }
seedPhrase={seedPhrase || verifiedSeedPhrase} seedPhrase={seedPhrase || verifiedSeedPhrase}
/> />
)} )}
@ -72,9 +72,9 @@ export default class SeedPhrase extends PureComponent {
<Route <Route
exact exact
path={INITIALIZE_BACKUP_SEED_PHRASE_ROUTE} path={INITIALIZE_BACKUP_SEED_PHRASE_ROUTE}
render={props => ( render={routeProps => (
<RevealSeedPhrase <RevealSeedPhrase
{ ...props } { ...routeProps }
seedPhrase={seedPhrase || verifiedSeedPhrase} seedPhrase={seedPhrase || verifiedSeedPhrase}
/> />
)} )}

Loading…
Cancel
Save