diff --git a/client/src/app/Routes.js b/client/src/app/Routes.js index 80a61cb9..a2ea0d90 100644 --- a/client/src/app/Routes.js +++ b/client/src/app/Routes.js @@ -1,23 +1,13 @@ -const React = require('react'); -const {Router, Route, IndexRoute, browserHistory} = require('react-router'); +import React from 'react'; +import {Router, Route, IndexRoute, browserHistory} from 'react-router'; -const App = require('app/App'); -const DemoPage = require('app/demo/components-demo-page'); +import App from 'app/App'; +import DemoPage from 'app/demo/components-demo-page'; -const MainLayout = require('app/main/main-layout'); -const MainHomePage = require('app/main/main-home/main-home-page'); -const MainSignUpPage = require('app/main/main-signup/main-signup-page'); +import MainLayout from 'app/main/main-layout'; +import MainHomePage from 'app/main/main-home/main-home-page'; +import MainSignUpPage from 'app/main/main-signup/main-signup-page'; -const DashboardLayout = require('app/main/dashboard/dashboard-layout'); - -const DashboardListTicketsPage = require('app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page'); -const DashboardListArticlesPage = require('app/main/dashboard/dashboard-list-articles/dashboard-list-articles-page'); - -const DashboardCreateTicketPage = require('app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page'); -const DashboardEditProfilePage = require('app/main/dashboard/dashboard-edit-profile/dashboard-edit-profile-page'); - -const DashboardArticlePage = require('app/main/dashboard/dashboard-article/dashboard-article-page'); -const DashboardTicketPage = require('app/main/dashboard/dashboard-ticket/dashboard-ticket-page'); export default ( @@ -25,16 +15,6 @@ export default ( - - - - - - - - - - diff --git a/client/src/app/main/dashboard/dashboard-article/dashboard-article-page.js b/client/src/app/main/dashboard/dashboard-article/dashboard-article-page.js deleted file mode 100644 index cdfbf4d2..00000000 --- a/client/src/app/main/dashboard/dashboard-article/dashboard-article-page.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const DashboardArticlePage = React.createClass({ - - render() { - return ( -
- DASHBOARD ARTICLE -
- ); - } -}); - -export default DashboardArticlePage; diff --git a/client/src/app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page.js b/client/src/app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page.js deleted file mode 100644 index aff1aaa2..00000000 --- a/client/src/app/main/dashboard/dashboard-create-ticket/dashboard-create-ticket-page.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const DashboardCreateTicketPage = React.createClass({ - - render() { - return ( -
- DASHBOARD CREATE TICKET -
- ); - } -}); - -export default DashboardCreateTicketPage; diff --git a/client/src/app/main/dashboard/dashboard-edit-profile/dashboard-edit-profile-page.js b/client/src/app/main/dashboard/dashboard-edit-profile/dashboard-edit-profile-page.js deleted file mode 100644 index 9073edb0..00000000 --- a/client/src/app/main/dashboard/dashboard-edit-profile/dashboard-edit-profile-page.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const DashboardEditProfilePage = React.createClass({ - - render() { - return ( -
- DASHBOARD EDIT PROFILE -
- ); - } -}); - -export default DashboardEditProfilePage; diff --git a/client/src/app/main/dashboard/dashboard-layout.js b/client/src/app/main/dashboard/dashboard-layout.js deleted file mode 100644 index 29f3fc69..00000000 --- a/client/src/app/main/dashboard/dashboard-layout.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react'; -import DashboardMenu from 'app/main/dashboard/dashboard-menu'; - -const DashboardLayout = React.createClass({ - - render() { - return ( -
-
-
{this.props.children}
-
- ); - } -}); - -export default DashboardLayout; diff --git a/client/src/app/main/dashboard/dashboard-list-articles/dashboard-list-articles-page.js b/client/src/app/main/dashboard/dashboard-list-articles/dashboard-list-articles-page.js deleted file mode 100644 index 1488cd58..00000000 --- a/client/src/app/main/dashboard/dashboard-list-articles/dashboard-list-articles-page.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const DashboardListArticlesPage = React.createClass({ - - render() { - return ( -
- DASHBOARD ARTICLES LIST -
- ); - } -}); - -export default DashboardListArticlesPage; diff --git a/client/src/app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page.js b/client/src/app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page.js deleted file mode 100644 index e3b9201e..00000000 --- a/client/src/app/main/dashboard/dashboard-list-tickets/dashboard-list-tickets-page.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const DashboardListTicketsPage = React.createClass({ - - render() { - return ( -
- DASHBOARD TICKET LIST -
- ); - } -}); - -export default DashboardListTicketsPage; diff --git a/client/src/app/main/dashboard/dashboard-menu.js b/client/src/app/main/dashboard/dashboard-menu.js deleted file mode 100644 index 2f64001b..00000000 --- a/client/src/app/main/dashboard/dashboard-menu.js +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; -import _ from 'lodash'; - -import Menu from 'core-components/menu'; - -let dashboardRoutes = [ - { path: '/app/dashboard', text: 'Ticket List' }, - { path: '/app/dashboard/create-ticket', text: 'Create Ticket' }, - { path: '/app/dashboard/articles', text: 'View Articles' }, - { path: '/app/dashboard/edit-profile', text: 'Edit Profile' } -]; - -const DashboardMenu = React.createClass({ - contextTypes: { - router: React.PropTypes.object - }, - - propTypes: { - location: React.PropTypes.object - }, - - render() { - return ( - - ); - }, - - getProps() { - return { - items: this.getMenuItems(), - selectedIndex: this.getSelectedIndex(), - onItemClick: this.goToPathByIndex - }; - }, - - getMenuItems: function () { - return dashboardRoutes.map(this.getMenuItem); - }, - - getMenuItem(item) { - return { - content: item.text - }; - }, - - getSelectedIndex() { - let pathname = this.props.location.pathname; - - return _.findIndex(dashboardRoutes, {path: pathname}); - }, - - goToPathByIndex(itemIndex) { - this.context.router.push(dashboardRoutes[itemIndex].path); - } -}); - -export default DashboardMenu; diff --git a/client/src/app/main/dashboard/dashboard-ticket/dashboard-ticket-page.js b/client/src/app/main/dashboard/dashboard-ticket/dashboard-ticket-page.js deleted file mode 100644 index f0c30458..00000000 --- a/client/src/app/main/dashboard/dashboard-ticket/dashboard-ticket-page.js +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; - -const DashboardTicketPage = React.createClass({ - - render() { - return ( -
- DASHBOARD TICKET PAGE -
- ); - } -}); - -export default DashboardTicketPage; diff --git a/client/src/core-components/icon.js b/client/src/core-components/icon.js index 8d6770f5..26c0898e 100644 --- a/client/src/core-components/icon.js +++ b/client/src/core-components/icon.js @@ -26,7 +26,7 @@ const Icon = React.createClass({ renderFlag() { return ( - + ); }, diff --git a/client/src/core-components/menu.scss b/client/src/core-components/menu.scss index a0beb93f..e872f7b1 100644 --- a/client/src/core-components/menu.scss +++ b/client/src/core-components/menu.scss @@ -11,7 +11,6 @@ &__list-item { padding: 8px; - &_selected, &:hover { background-color: $primary-red; color: white; @@ -24,7 +23,6 @@ } &_secondary { - .menu__list-item_selected, .menu__list-item:hover { background-color: $secondary-blue; }