Conversation
…s for the initial search
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289 |
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289 |
| }, [formattedGuid, retrieveUserInfo]); | ||
|
|
||
| useEffect(() => { | ||
| if (userRegionsOptions === null && retrieveUserInfoResponse && pimsRegionsTypes) { |
There was a problem hiding this comment.
this block seems to be repeated a few times, could this be placed in a reusable method?
There was a problem hiding this comment.
we normally use exists(x) for these sorts of checks.
| return { id: x.code as string, text: x.label }; | ||
| }) ?? []; | ||
| setUserRegionsOptions(userRegionsOptions ?? []); | ||
| setFilter(new AcquisitionFilterModel(userRegionsOptions).toApi()); |
There was a problem hiding this comment.
this seems to be the only difference between duplicated sections.
| }, [formattedGuid, retrieveUserInfo]); | ||
|
|
||
| useEffect(() => { | ||
| if (userRegionsOptions === null && retrieveUserInfoResponse && pimsRegionsTypes) { |
There was a problem hiding this comment.
nit" use exists() for null checks
…n the Activity Overview Report
|
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289 |
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5289 |



No description provided.