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

Project listing #1

Merged
merged 3 commits into from
May 30, 2017
Merged

Project listing #1

merged 3 commits into from
May 30, 2017

Conversation

eatyourgreens
Copy link
Contributor

Adds a basic project listing, linking each project up to the project contents view.

@eatyourgreens eatyourgreens requested a review from simoneduca May 26, 2017 11:19
Copy link
Contributor

@simoneduca simoneduca left a comment

Choose a reason for hiding this comment

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

I made a comment about getting the correct project_contents id for each project.

@@ -26,12 +26,12 @@ const projectContentsReducer = (state = initialState, action) => {
};

// Action Creators
const fetchProjectContents = () => {
const fetchProjectContents = (project_id) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

You're requesting project_contents with project_id, which isn't right. project_contents id is needed, which available in project links.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad, this should actually be requesting a list of all ProjectContents resources for a given project, then listing them by language.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed now.

@@ -31,7 +31,10 @@ const fetchProjectContents = (project_id) => {
dispatch({
type: FETCH_PROJECT_CONTENTS,
});
apiClient.type('project_contents').get(project_id)
const query = {
project_id: project_id
Copy link
Contributor

Choose a reason for hiding this comment

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

Shorthand property is nicer perhaps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Only display the first for now.
@simoneduca
Copy link
Contributor

LGTM!

@simoneduca simoneduca merged commit 1dc6e23 into master May 30, 2017
@simoneduca simoneduca deleted the project-list branch May 30, 2017 11:46
@eatyourgreens eatyourgreens mentioned this pull request Jun 15, 2017
18 tasks
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