aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2019-02-07 01:32:45 -0500
committerDeterminant <ted.sybil@gmail.com>2019-02-07 01:32:45 -0500
commit735d8e5aa8b590b37a16c0e1b52a688c43dd5c10 (patch)
tree3fa81f703a18a6c3780d22c7a27867392412dafe /src/App.js
parent608f68cba0fa98f2db31b95a1bbc4cabb98586ea (diff)
add popup
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js99
1 files changed, 0 insertions, 99 deletions
diff --git a/src/App.js b/src/App.js
deleted file mode 100644
index bd17cec..0000000
--- a/src/App.js
+++ /dev/null
@@ -1,99 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import 'typeface-roboto';
-import { withStyles } from '@material-ui/core/styles';
-import { MuiThemeProvider } from '@material-ui/core/styles';
-import CssBaseline from '@material-ui/core/CssBaseline';
-import AppBar from '@material-ui/core/AppBar';
-import Toolbar from '@material-ui/core/Toolbar';
-import Typography from '@material-ui/core/Typography';
-import Paper from '@material-ui/core/Paper';
-import Tabs from '@material-ui/core/Tabs';
-import Tab from '@material-ui/core/Tab';
-import Grid from '@material-ui/core/Grid';
-import { HashRouter as Router, withRouter, Route, Link, Redirect, Switch } from "react-router-dom";
-import { hashHistory } from 'react-router';
-import Logo from './Logo';
-import theme from './theme';
-import CustomAnalyzer from './CustomAnalyzer';
-import Settings from './Settings';
-
-const styles = theme => ({
- root: {
- display: 'flex',
- height: '100vh',
- },
- appBar: {
- zIndex: theme.zIndex.drawer + 1,
- transition: theme.transitions.create(['width', 'margin'], {
- easing: theme.transitions.easing.sharp,
- duration: theme.transitions.duration.leavingScreen,
- }),
- },
- title: {
- flexGrow: 1,
- display: 'inline-block'
- },
- appBarSpacer: theme.mixins.toolbar,
- content: {
- flexGrow: 1,
- padding: theme.spacing.unit * 3,
- overflow: 'auto',
- },
- indicator: {
- backgroundColor: theme.palette.primary.contrastText
- }
-});
-
-class DashboardTabs extends React.Component {
- handleChangeTab = (event, currentTab) => {
- this.props.history.push(currentTab);
- }
- render() {
- const { classes } = this.props;
- return (
- <div className={classes.root}>
- <AppBar
- position="absolute"
- className={classes.appBar}>
- <Toolbar className={classes.toolbar}>
- <Typography component="h1" variant="h6" color="inherit" noWrap className={classes.title}>
- <Logo style={{width: '2em', verticalAlign: 'bottom', marginRight: '0.2em'}}/>Chromicle
- </Typography>
- <Tabs styles={{ display: 'inline-block '}}
- classes={{ indicator: classes.indicator }}
- value={this.props.history.location.pathname}
- onChange={this.handleChangeTab}>
- <Tab label="Settings" component={Link} to="/settings" value="/settings" />
- <Tab label="Analyze" component={Link} to="/analyze" value="/analyze" />
- </Tabs>
- </Toolbar>
- </AppBar>
- <CssBaseline />
- <main className={classes.content}>
- <div className={classes.appBarSpacer} />
- <Route exact path="/settings" component={Settings} />
- <Route exact path="/analyze" component={CustomAnalyzer} />
- <Route exact path="/" render={() => <Redirect to="/settings" />}/>
- </main>
- </div>
- );
- }
-}
-
-DashboardTabs.propTypes = {
- classes: PropTypes.object.isRequired,
-};
-
-class Dashboard extends React.Component {
- render() {
- const { classes } = this.props;
- let Tabs = withRouter(withStyles(styles)(DashboardTabs));
- return (
- <MuiThemeProvider theme={theme}>
- <Router><Tabs /></Router>
- </MuiThemeProvider>);
- }
-}
-
-export default Dashboard;