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

switch to using react hooks and functional components #17

Merged
merged 2 commits into from
Dec 19, 2019
Merged

switch to using react hooks and functional components #17

merged 2 commits into from
Dec 19, 2019

Conversation

butlerx
Copy link
Member

@butlerx butlerx commented Dec 15, 2019

This Pr is rather large because react hooks a quite different but they result in far less boilerplate and more easily understood code.

As part of this PR, I also removed the style of map and push in favour of pure maps as this is far simpler and more efficient.

This PR closes #16 #14 #15 #13 #11 #9 #8 #7 #6 #5 #4 #3 and #1
It also Makes it possible to stop using stock images ala #12
and fixes some of the issues listed in #10

@theycallmemac theycallmemac requested a review from Frazl December 15, 2019 23:44
@theycallmemac
Copy link
Member

@butlerx good work on this - I've requested a review from @Frazl as his input is better here than mine.

Copy link
Contributor

@Frazl Frazl left a comment

Choose a reason for hiding this comment

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

Just needs one small fix besides that looks good to me, good work :)

<h2>
{isEventsPage ? 'View our latest events here!' : "We are DCU's Computer Networking Society"}
</h2>
<ImageGrid images={images} />
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be changed to check if images have been passed. Gives an error currently on /events.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also appears as if committee photos aren't loading at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed i had moved the image check inside the component but forgot to return an empty component

Copy link
Member Author

Choose a reason for hiding this comment

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

committee is working locally for me any console error?

Copy link
Contributor

Choose a reason for hiding this comment

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

No errors, just not appearing with their photos, only rb logo

Copy link
Member Author

Choose a reason for hiding this comment

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

I Added a fall back if photos isn't specified to fall back to brick, is it just appearing for blank profiles or all?

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.

Link to webmail is incorrect
3 participants