forked from rstormsf/multisender
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,44 @@ | ||
import React, { Component } from 'react'; | ||
import { Header, FirstStep, SecondStep, ThirdStep, FourthStep, FifthStep, Retry, Welcome } from './components'; | ||
import { Route } from 'react-router-dom'; | ||
import { Route, Redirect } from 'react-router-dom'; | ||
import { inject, observer } from "mobx-react"; | ||
import './assets/stylesheets/application.css'; | ||
|
||
console.log('agregator of txs') | ||
const PrivateRoute = ({ component: Component, startedUrl, ...rest }) => ( | ||
<Route | ||
{...rest} | ||
render={props => | ||
startedUrl === '#/' || startedUrl === '#/1' ? ( | ||
<Component {...props} /> | ||
) : ( | ||
<Redirect | ||
to={{ | ||
pathname: "/" | ||
}} | ||
/> | ||
) | ||
} | ||
/> | ||
); | ||
|
||
@inject("UiStore") | ||
export class App extends React.Component { | ||
render(){ | ||
let startedUrl = this.props.UiStore.web3Store.startedUrl | ||
|
||
return ( | ||
<div> | ||
<Header/> | ||
<Route exact path="/" component={FirstStep}/> | ||
<Route exact path="/1" component={FirstStep}/> | ||
<Route exact path="/2" component={SecondStep}/> | ||
<Route exact path="/3" component={ThirdStep}/> | ||
<Route exact path="/4" component={FourthStep}/> | ||
<Route exact path="/5" component={FifthStep}/> | ||
<PrivateRoute path="/2" component={SecondStep} startedUrl={startedUrl} /> | ||
<PrivateRoute exact path="/2" component={SecondStep} startedUrl={startedUrl}/> | ||
<PrivateRoute exact path="/3" component={ThirdStep} startedUrl={startedUrl}/> | ||
<PrivateRoute exact path="/4" component={FourthStep} startedUrl={startedUrl}/> | ||
<PrivateRoute exact path="/5" component={FifthStep} startedUrl={startedUrl}/> | ||
|
||
{/* <Route exact path="/retry" component={Retry}/> */} | ||
</div> | ||
); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters