diff --git a/src/lib/tooltip/index.css b/src/lib/components/Tooltip/index.css
similarity index 100%
rename from src/lib/tooltip/index.css
rename to src/lib/components/Tooltip/index.css
diff --git a/src/lib/tooltip/index.js b/src/lib/components/Tooltip/index.js
similarity index 78%
rename from src/lib/tooltip/index.js
rename to src/lib/components/Tooltip/index.js
index 6ed2d42..3055ffb 100644
--- a/src/lib/tooltip/index.js
+++ b/src/lib/components/Tooltip/index.js
@@ -1,12 +1,6 @@
-/**
- * Created by terencelimzw on 24/12/16.
- */
-/**
- * Created by terencelimzw on 24/12/16.
- */
import React, {PropTypes} from "react";
-import "./index.css";
+import "./index.css"
const Tooltip = ({show,x,y,message}) => {
const classes = show ? "tooltip show" : "tooltip";
diff --git a/src/main/index.css b/src/lib/containers/AppShell/index.css
similarity index 100%
rename from src/main/index.css
rename to src/lib/containers/AppShell/index.css
diff --git a/src/main/index.js b/src/lib/containers/AppShell/index.js
similarity index 73%
rename from src/main/index.js
rename to src/lib/containers/AppShell/index.js
index aff20c1..54afc1a 100644
--- a/src/main/index.js
+++ b/src/lib/containers/AppShell/index.js
@@ -1,16 +1,9 @@
-/**
- * Created by terencelimzw on 26/12/16.
- */
-
-import React, {Component } from 'react';
-import Navbar from '../lib/nav';
+import React, {Component} from 'react';
+import Navbar from '../../components/Navbar';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import './index.css';
-export default class About extends Component {
- // static propTypes = {}
- // static defaultProps = {}
- // state = {}
+export default class AppShell extends Component {
render() {
// const { className, ...props } = this.props;
diff --git a/src/app/index.css b/src/lib/containers/Module/index.css
similarity index 100%
rename from src/app/index.css
rename to src/lib/containers/Module/index.css
diff --git a/src/app/index.js b/src/lib/containers/Module/index.js
similarity index 86%
rename from src/app/index.js
rename to src/lib/containers/Module/index.js
index 6ed9fca..f4cd531 100644
--- a/src/app/index.js
+++ b/src/lib/containers/Module/index.js
@@ -1,17 +1,16 @@
import React, { Component } from 'react';
-import Card from '../lib/card';
-import HeatMap from '../lib/heatmap'
-import Axis from '../lib/axes'
-import ChartSVG from '../lib/chart'
-import Tooltip from '../lib/tooltip'
-import Select from '../lib/select'
+import Card from '../../components/Card';
+import HeatMap from '../../components/Heatmap';
+import Axis from '../../components/HeatmapAxes';
+import ChartSVG from '../../components/ChartSVG';
+import Tooltip from '../../components/Tooltip';
+import Select from '../../components/Select';
import {json} from 'd3-request'
import * as d3 from 'd3'
import './index.css';
-import '../fonts/font.css'
-class App extends Component {
+class Module extends Component {
constructor(props) {
super(props);
this.state = {hover:false,x:0,y:0,value:0};
@@ -35,10 +34,10 @@ class App extends Component {
update_timestamp: update_timestamp
});
};
- json("http://222.164.236.19:9003/latest.json",
- (error,data)=>{
- if (error) {
- console.log(error);
+ // json("http://222.164.236.19:9003/latest.json",
+ // (error,data)=>{
+ // if (error) {
+ // console.log(error);
json("https://raw.githubusercontent.com/terencelimzhengwei/active-sg-badminton/master/data/latest.json",
(error,data)=>{
if (error) {
@@ -47,11 +46,11 @@ class App extends Component {
setData(data);
}
)
- } else {
- setData(data);
- }
- }
- );
+ // } else {
+ // setData(data);
+ // }
+ // }
+ // );
}
render() {
@@ -125,4 +124,4 @@ class App extends Component {
}
}
-export default App;
+export default Module;
diff --git a/src/logo.svg b/src/logo.svg
deleted file mode 100644
index 6b60c10..0000000
--- a/src/logo.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/src/routes.js b/src/routes/routes.js
similarity index 66%
rename from src/routes.js
rename to src/routes/routes.js
index d406445..03a6744 100644
--- a/src/routes.js
+++ b/src/routes/routes.js
@@ -5,10 +5,10 @@
import React from 'react';
import { Router, Route } from 'react-router';
-import App from './app';
-import About from './about';
-import Main from './main';
-import NotFound from './notfound';
+import App from '../lib/containers/Module'
+import About from '../lib/components/AboutPage';
+import Main from '../lib/containers/AppShell';
+import NotFound from '../lib/components/NotFoundPage';
const Routes = (props) => (