Removing top bar

This commit is contained in:
Richard Ramos 2018-10-22 09:46:11 -04:00
parent 14131d6c31
commit 390c967728
3 changed files with 5 additions and 23 deletions

View File

@ -10,21 +10,7 @@ import SNTUI from './snt-ui';
export default ({ setAccount }) => {
return (
<div class="container">
<TopNavbar accountUpdateHandler={(e) => setAccount(e)} />
<Tabs defaultActiveKey={0} id="uncontrolled-tab-example">
<Tab eventKey={0} title="VotingDapp">
</Tab>
<Tab eventKey={2} title="SNT Token">
<SNTUI />
</Tab>
<Tab eventKey={3} title="TestToken">
<TestTokenUI />
</Tab>
<Tab eventKey={4} title="ERC20Token">
<ERC20TokenUI />
</Tab>
</Tabs>
<SNTUI />
</div>
)
}

View File

@ -7,7 +7,7 @@ import Collapse from '@material-ui/core/Collapse';
import LinearProgress from '@material-ui/core/LinearProgress';
import { VotingContext } from '../context';
import { Route, Switch } from "react-router-dom";
import AdminView from '../components/AdminView';
import TitleScreen from './flow/TitleScreen';
import LearnAboutBallots from './flow/LearnAboutBallots';
import HowVotingWorks from './flow/HowVotingWorks';
@ -56,11 +56,7 @@ class Voting extends PureComponent {
{({ getPolls, rawPolls, loading, symbol }) =>
<div>
<CssBaseline />
<AppBar togglePoll={togglePoll} symbol={symbol} />
{loading && <LinearProgress />}
<Collapse in={addPoll}>
<AddPoll togglePoll={togglePoll} getPolls={getPolls} />
</Collapse>
<div id="votingDapp">
<Switch>
<Route exact path="/" render={() => <TitleScreen polls={rawPolls} />} />
@ -73,6 +69,8 @@ class Voting extends PureComponent {
<Route path="/voting/:id/:back?" render={props => <PollVoting polls={rawPolls} idPoll={props.match.params.id} balances={pollTokenBalances} originalVotes={votes} back={!!props.match.params.back} setVotesToReview={this.setVotesToReview} />} />
<Route path="/review/:id" render={props => <ReviewVotes polls={rawPolls} idPoll={props.match.params.id} votes={votes} balances={pollTokenBalances} setTransactionPromise={this.setTransactionPromise} setTransactionHash={this.setTransactionHash} />} />
<Route path="/results/:id" render={props => <Results polls={rawPolls} idPoll={props.match.params.id} transaction={transaction} transactionHash={transactionHash} />} />
<Route path="/admin" render={() => <AdminView />} />
<Route path="/addPoll" render={() => <AddPoll togglePoll={togglePoll} getPolls={getPolls} />} />
</Switch>
</div>
</div>

View File

@ -3,12 +3,10 @@ import ReactDOM from 'react-dom';
import web3 from "Embark/web3"
import EmbarkJS from 'Embark/EmbarkJS';
import PollManager from 'Embark/contracts/PollManager';
import AdminView from './components/AdminView';
import Voting from './components/Voting';
import SNT from 'Embark/contracts/SNT';
import { VotingContext } from './context';
import Web3Render from './components/standard/Web3Render';
import fetchIdeas from './utils/fetchIdeas';
import { getPolls, omitPolls } from './utils/polls';
import { HashRouter as Router, Route, Link } from "react-router-dom";
@ -121,7 +119,7 @@ class App extends React.Component {
<Router>
<VotingContext.Provider value={votingContext}>
<Fragment>
{admin ? <AdminView setAccount={this.setAccount} /> : <Route path="/" component={Voting}/>}
<Route path="/" component={Voting}/>
</Fragment>
</VotingContext.Provider>
</Router>