Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code-review #6

Open
wants to merge 120 commits into
base: new-code-review
Choose a base branch
from
Open

code-review #6

wants to merge 120 commits into from

Conversation

bumsyalao
Copy link
Owner

No description provided.

Copy link

@emmyakin emmyakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to run eslint on your files
Remove all console.logs, and line spaces

.travis.yml Outdated
- sudo -u postgres createuser bunmialao
- createdb postit-test

script:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can omit these two lines
or use 'npm test' instead, there is no need to add "run" for scripts command that are native to npm scripts

Procfile Outdated
@@ -0,0 +1 @@
web: NODE_ENV=production node server.prod.js

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default Heroku sets NODE_ENV to production, so, just node server.prod.js is fine

app.js Outdated
import routes from './server/routes/index';

const port = parseInt(process.env.PORT, 10) || 3000;
const homepage = `${__dirname}/client/index.html`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused variable


routes(app);

module.exports = app;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export default app for consistency with es6 modules

client/Index.jsx Outdated
import { createStore, applyMiddleware, compose } from 'redux';
import attachAuthorizationToken from "../client/utils/attachToken";
import store from '../client/store/configureStore';
import { setCurrentUser } from './actions/users';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remember setCurrentUser is a default export, so remove curly braces

// import { userSignInRequest } from '../../actions/SignInAction';
import NavigationBar from '../NavigationBar';

class SignInPage extends React.Component {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use functional component

import ListGroup from './Group/ListGroup';


const SideBar=() => (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space before and after =

}

}
NavigationBar.proptypes = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

propTypes

}
);

const mapDispatchToProps = () => ({
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just use an object declaration here rather than using a function


listUsers (groupId) {
if (this.props.users.length > 0) return;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove line space here and below

@bumsyalao bumsyalao temporarily deployed to postit-now September 14, 2017 09:47 Inactive
@bumsyalao bumsyalao temporarily deployed to postit-now September 14, 2017 09:56 Inactive
@bumsyalao bumsyalao temporarily deployed to postit-now October 12, 2017 13:16 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants