{"size": 821, "ext": "js", "max_stars_repo_path": "src/components/app.js", "max_stars_repo_name": "thangchung/owasp-quiz", "max_stars_repo_stars_event_min_datetime": "2018-12-24T21:58:05.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-10T18:28:53.000Z", "max_issues_repo_path": "src/components/app.js", "max_issues_repo_name": "thangchung/owasp-quiz", "max_issues_repo_issues_event_min_datetime": "2018-03-25T07:00:03.000Z", "max_issues_repo_issues_event_max_datetime": "2018-03-27T12:46:35.000Z", "max_forks_repo_path": "src/components/app.js", "max_forks_repo_name": "thangchung/owasp-quiz", "max_forks_repo_forks_event_min_datetime": "2021-02-11T13:14:36.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-11T13:14:36.000Z"}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 21.6052631579, "max_line_length": 51, "alphanum_fraction": 0.6114494519}
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Router } from 'preact-router';
import { Provider } from 'mobx-preact';
import { AppBar } from 'react-toolbox/lib/app_bar';

import { Header, Footer } from './';
import Profile from 'async!../routes/profile';
import Exam from 'async!../routes/exam';

import { store } from '../models';

if (module.hot) {
	require('preact/debug');
}

export default class App extends Component {
	handleRoute = e => {
		this.currentUrl = e.url;
	};

	render() {
		return (
			<Provider store={store}>
				<div id="app">
					<Header />
					<Router onChange={this.handleRoute}>
						<Exam path="/" />
						<Profile path="/profile/" user="me" />
						<Profile path="/profile/:user" />
					</Router>
					<Footer />
				</div>
			</Provider>
		);
	}
}
