Skip to content

Commit

Permalink
Make invest available even if there is no injected web3
Browse files Browse the repository at this point in the history
  • Loading branch information
Franco Victorio committed Mar 26, 2018
1 parent 0043a7b commit f21d79d
Showing 1 changed file with 29 additions and 24 deletions.
53 changes: 29 additions & 24 deletions src/App.js
Expand Up @@ -27,31 +27,36 @@ class App extends Component {
<div>
<Header/>

<Web3Provider
onChangeAccount={deploymentStore.handleAccountChange}
web3UnavailableScreen={NoWeb3}
>
<Switch>
{/* The route to /4 must be first for the incomplete deploy redirect to work */}
<Route path="/4" component={stepFour}/>
<Switch>
<Route exact path="/invest" component={Invest}/>

{
deploymentStore.deployInProgress ? (
<IncompleteDeploy />
) : (
<Switch>
<Route exact path="/" component={crowdsaleAddr ? Crowdsale : Home}/>
<Route exact path="/crowdsale" component={Crowdsale}/>
<Route exact path="/invest" component={Invest}/>
<Route exact path="/manage/:crowdsaleAddress" component={Manage}/>
<Route path="/1" component={stepOne}/>
<Route path="/2" component={stepTwo}/>
<Route path="/3" component={stepThree}/>
</Switch>
)
}
</Switch>
</Web3Provider>
<Route>
<Web3Provider
onChangeAccount={deploymentStore.handleAccountChange}
web3UnavailableScreen={NoWeb3}
>
<Switch>
{/* The route to /4 must be first for the incomplete deploy redirect to work */}
<Route path="/4" component={stepFour}/>

{
deploymentStore.deployInProgress ? (
<IncompleteDeploy />
) : (
<Switch>
<Route exact path="/" component={crowdsaleAddr ? Crowdsale : Home}/>
<Route exact path="/crowdsale" component={Crowdsale}/>
<Route exact path="/manage/:crowdsaleAddress" component={Manage}/>
<Route path="/1" component={stepOne}/>
<Route path="/2" component={stepTwo}/>
<Route path="/3" component={stepThree}/>
</Switch>
)
}
</Switch>
</Web3Provider>
</Route>
</Switch>

<Footer/>
<AlertContainer ref={a => toast.msg = a} {...TOAST.DEFAULT_OPTIONS} />
Expand Down

0 comments on commit f21d79d

Please sign in to comment.