-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor: Landscape membership list #1262
Conversation
const success = _.get('meta.requestStatus', data) === 'fulfilled'; | ||
if (success) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const success = _.get('meta.requestStatus', data) === 'fulfilled'; | |
if (success) { | |
if (_.get('meta.requestStatus', data) === 'fulfilled') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like success is only used once. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulschreiber Yes, it is just used once, I added the separate variable for readibility
src/landscape/landscapeUtils.js
Outdated
// Get bounding box from nominatim.openstreetmap.org if no areaPolygon data | ||
// AreaPolygon is not present when the user decided to skip it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: please explain in more detail.
src/landscape/landscapeUtils.js
Outdated
areaPolygon: landscape.areaPolygon | ||
? JSON.parse(landscape.areaPolygon) | ||
: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
questioN: do we need to wrap the parse in a try/catch?
src/landscape/landscapeSlice.js
Outdated
if (landscape.slug === slug) { | ||
return valueGenerator(landscape); | ||
} | ||
return landscape; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see note below regarding membership.email
.
@@ -0,0 +1,48 @@ | |||
import React, { useCallback } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: add copyright notice.
src/landscape/landscapeService.js
Outdated
import { | ||
ALL_PARTNERSHIP_STATUS, | ||
MEMBERSHIP_ROLE_MEMBER, | ||
} from './landscapeConstants'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: do not use relative path.
12e4993
to
aefa45e
Compare
ee9bd4b
to
26c74d2
Compare
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
Co-authored-by: Paul Schreiber <[email protected]>
26c74d2
to
472a8f7
Compare
The final PR is: #1317 |
Description
Landscape is using a group to handle the user memberships in this PR I changed it to use MembershipList to removing the dependency with Group.
With this PR there is some duplciation added for the components and functions that eventually will be removed when groups are changed to use membership list too.
Checklist
Related Issues
Related PRs