Skip to content

Commit

Permalink
fix lint errors to components
Browse files Browse the repository at this point in the history
  • Loading branch information
John Edward committed Apr 3, 2017
1 parent a007365 commit 3aa8e12
Show file tree
Hide file tree
Showing 45 changed files with 815 additions and 800 deletions.
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/node_modules
/.meteor
/.vscode
/client
/public
2 changes: 1 addition & 1 deletion client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import './lib/base/lib/admin-lte/dist/js/app.min.js';
import './main.html';

// Main JSX
import '/imports/startup/client/index.jsx';
import '/imports/startup/client/index';
10 changes: 10 additions & 0 deletions imports/startup/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable import/no-unresolved */
import { Meteor } from 'meteor/meteor';
import React from 'react';
import { render } from 'react-dom';
import { Routes } from './routes';

Meteor.startup(() => {
render(<Routes />, document.getElementById('react-root'));
$('body').addClass('skin-blue');
});
8 changes: 0 additions & 8 deletions imports/startup/client/index.jsx

This file was deleted.

23 changes: 23 additions & 0 deletions imports/startup/client/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import { Router, Route, browserHistory } from 'react-router';

import Index from '../../ui/components/index';
import SignIn from '../../ui/components/sign_in';
import SignUp from '../../ui/components/sign_up';
import Dashboard from '../../ui/components/dashboard/dashboard';
import Statistics from '../../ui/components/dashboard/views/statistics/statistics';
import { NotFound } from '../../ui/pages/not_found/not_found';

export const Routes = () => (
<Router history={browserHistory}>
<Route path="/" component={Index}>
<Route path="/home" name="home" component={Index} />
<Route path="/sign-in" name="signIn" component={SignIn} />
<Route path="/sign-up" name="signUp" component={SignUp} />
<Route path="/dashboard" component={Dashboard}>
<Route path="/dashboard" component={Statistics} />
</Route>
</Route>
<Route name="not-found" path="*" component={NotFound} />
</Router>
);
23 changes: 0 additions & 23 deletions imports/startup/client/routes.jsx

This file was deleted.

12 changes: 12 additions & 0 deletions imports/ui/components/app/app_footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';

const AppFooter = () => (
<footer className="main-footer">
<div className="pull-right hidden-xs">
<b>Version</b> 2.3.11
</div>
<strong>Copyright &copy; 2014-2015 <a href="http://almsaeedstudio.com">Almsaeed Studio</a>.</strong> All rights reserved.
</footer>
);

export default AppFooter;
15 changes: 0 additions & 15 deletions imports/ui/components/app/app_footer.jsx

This file was deleted.

32 changes: 32 additions & 0 deletions imports/ui/components/app/app_header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';

import AppHeaderNotificationMenu from './header_menus/app_header_notification_menu';
import AppHeaderUserMenu from './header_menus/app_header_user_menu';

const AppHeader = () => (
<header className="main-header">

<a href="#" className="logo">
<span className="logo-mini"><b>A</b>L</span>
<span className="logo-lg"><b>Admin</b>LTE</span>
</a>

<nav className="navbar navbar-static-top">
<a href="#" className="sidebar-toggle" data-toggle="offcanvas" role="button">
<span className="sr-only">Toggle navigation</span>
</a>

<div className="navbar-custom-menu">
<ul className="nav navbar-nav">

<AppHeaderNotificationMenu />
<AppHeaderUserMenu />

</ul>
</div>
</nav>

</header>
);

export default AppHeader;
39 changes: 0 additions & 39 deletions imports/ui/components/app/app_header.jsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { Component } from 'react';

// components
import AppHeaderNotificationMenuItem from './app_header_notification_menu_item';

export default class AppHeaderNotificationMenu extends Component {

getNotificationItems() {
const notificationItems = [
{ _id: '1', classNames: 'fa fa-users text-aqua', message: '5 new members joined today' },
{ _id: '2', classNames: 'fa fa-warning text-yellow', message: 'Very long description here' },
];
/* eslint-disable no-underscore-dangle*/
return notificationItems.map(item => (
<AppHeaderNotificationMenuItem
key={item._id}
classNames={item.classNames}
message={item.message}
/>)
);
}

render() {
return (
<li className="dropdown notifications-menu">
<a href="#" className="dropdown-toggle" data-toggle="dropdown">
<i className="fa fa-bell-o" />
<span className="label label-warning">2</span>
</a>
<ul className="dropdown-menu">
<li className="header">You have 2 notifications</li>
<li>
<ul className="menu">
{this.getNotificationItems()}
</ul>
</li>
<li className="footer"><a href="#">View all</a></li>
</ul>
</li>
);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React, { PropTypes } from 'react';

const AppHeaderNotificationMenuItem = ({ classNames, message }) => (
<li>
<a href="#">
<i className={classNames} /> {message}
</a>
</li>
);

AppHeaderNotificationMenuItem.propTypes = {
classNames: PropTypes.string,
message: PropTypes.string,
};

export default AppHeaderNotificationMenuItem;

This file was deleted.

Loading

0 comments on commit 3aa8e12

Please sign in to comment.