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

Add react router #9

Merged
merged 1 commit into from
Jun 25, 2020
Merged

Add react router #9

merged 1 commit into from
Jun 25, 2020

Conversation

jeremykirc
Copy link
Owner

No description provided.

@jeremykirc jeremykirc requested a review from kevinkir June 25, 2020 01:07
Copy link
Collaborator

@kevinkir kevinkir left a comment

Choose a reason for hiding this comment

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

We should add .DS_Store to .gitignore. other than that looks good to me!


useEffect(() => {
let fetchData = async () => {
axios.get('/api/v1/images/test_grid_data')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like you started to convert to async/await but stopped. I'd recommend either getting rid of the wrapping fetchData function or using await here.

.then(response => {
setImageBoxes(generateImageBoxes(response.data));
})
.catch(error => console.log(error));
Copy link
Collaborator

Choose a reason for hiding this comment

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

console.error will be easier to see

@jeremykirc jeremykirc merged commit c9d1f77 into master Jun 25, 2020
@jeremykirc jeremykirc linked an issue Jun 25, 2020 that may be closed by this pull request
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.

Add react router for SPA routing
2 participants