Commit ee2e08c3 authored by Thomas Roos's avatar Thomas Roos

Rename all files to jsx extension, since they are jsx format

parent 7cf7f30b
import React from 'react';
import * as api from "../api";
import * as api from "../api.jsx";
class GraderManager extends React.Component {
constructor(props) {
......
/*
./client/index.js
which is the webpack entry file
*/
// @flow
import 'bulma/css/bulma.css';
import 'font-awesome/css/font-awesome.css';
import React from 'react';
......@@ -10,60 +5,68 @@ import ReactDOM from 'react-dom';
import Loadable from 'react-loadable';
import {BrowserRouter as Router, Route, Switch} from 'react-router-dom';
import NavBar from './components/NavBar';
import Footer from './components/Footer';
import NavBar from './components/NavBar.jsx';
import Footer from './components/Footer.jsx';
const Loading = () => <div>Loading...</div>;
const Home = Loadable({
loader: () => import('./views/Home'),
loader: () => import('./views/Home.jsx'),
loading: Loading,
});
const Exams = Loadable({
loader: () => import('./views/Exams'),
loader: () => import('./views/Exams.jsx'),
loading: Loading,
});
const Students = Loadable({
loader: () => import('./views/Students'),
loader: () => import('./views/Students.jsx'),
loading: Loading,
});
const Grade = Loadable({
loader: () => import('./views/Grade'),
loader: () => import('./views/Grade.jsx'),
loading: Loading,
});
const Graders = Loadable({
loader: () => import('./views/Graders'),
loader: () => import('./views/Graders.jsx'),
loading: Loading,
});
const Statistics = Loadable({
loader: () => import('./views/Statistics'),
loader: () => import('./views/Statistics.jsx'),
loading: Loading,
});
const Reset = Loadable({
loader: () => import('./views/Reset'),
loader: () => import('./views/Reset.jsx'),
loading: Loading,
});
class App extends React.Component {
render() {
return (
<Router>
<div>
<NavBar />
<Switch>
<Route exact path="/" component={Home} />
<Route path="/exams" component={Exams} />
<Route path="/students" component={Students} />
<Route path="/grade" component={Grade} />
<Route path="/graders" component={Graders} />
<Route path="/reset" component={Reset} />
<Route path="/statistics" component={Statistics} />
</Switch>
<Footer />
</div>
</Router>
)
}
}
var root = document.getElementById('root');
if (root == null) {
throw new Error("no pad element");
} else {
ReactDOM.render((
<Router>
<div>
<NavBar />
<Switch>
<Route exact path="/" component={Home} />
<Route path="/exams" component={Exams} />
<Route path="/students" component={Students} />
<Route path="/grade" component={Grade} />
<Route path="/graders" component={Graders} />
<Route path="/reset" component={Reset} />
<Route path="/statistics" component={Statistics} />
</Switch>
<Footer />
</div>
</Router>
), root);
ReactDOM.render(<App />, root);
}
import React from 'react';
import Dropzone from 'react-dropzone'
import Hero from '../components/Hero';
import Hero from '../components/Hero.jsx';
import * as api from '../api'
import * as api from '../api.jsx'
const StatusPDF = props => {
let iconClass = "fa fa-";
......
import React from 'react';
import Hero from '../components/Hero';
import Hero from '../components/Hero.jsx';
const Grade = () => {
return (
......
import React from 'react';
import Hero from '../components/Hero';
import GraderManager from '../components/GradersManager';
import Hero from '../components/Hero.jsx';
import GraderManager from '../components/GradersManager.jsx';
const Graders = () => {
return (
......
import React from 'react';
import ReactMarkdown from 'react-markdown';
import Hero from '../components/Hero';
import Hero from '../components/Hero.jsx';
import homeMarkdown from './home.md'
......
import React from 'react';
import Hero from '../components/Hero';
import Hero from '../components/Hero.jsx';
const Reset = () => {
return (
......
import React from 'react';
import Hero from '../components/Hero';
import Hero from '../components/Hero.jsx';
const StatisticsDashboard = () => {
return (
......
......@@ -2,9 +2,9 @@ import React from 'react';
import getClosest from 'get-closest';
import Mousetrap from 'mousetrap';
import Hero from '../components/Hero';
import Hero from '../components/Hero.jsx';
import * as api from '../api';
import * as api from '../api.jsx';
import ProgressBar from './students/ProgressBar.jsx';
import SearchPanel from './students/SearchPanel.jsx';
......
import React from 'react';
import * as api from '../../api';
import * as api from '../../api.jsx';
import IDBlock from './IDBlock.jsx';
......
import React from 'react';
import * as api from '../../api';
import * as api from '../../api.jsx';
class IDBlock extends React.Component {
......
import React from 'react';
import Fuse from 'fuse.js';
import * as api from '../../api';
import * as api from '../../api.jsx';
import StudentPanelBlock from './StudentPanelBlock.jsx';
......
......@@ -12,7 +12,7 @@ const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
})
module.exports = {
entry: './client/index.js',
entry: './client/index.jsx',
output: {
path: path.resolve('zesje/static'),
filename: 'index_bundle.js'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment