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

chore: refactor modal opening in project area page #3211

Merged

Conversation

RRanath
Copy link
Collaborator

@RRanath RRanath commented Apr 26, 2024

Implements #NDT-282

Copy link
Contributor

@AntBush AntBush left a comment

Choose a reason for hiding this comment

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

Looks good, just some nits about naming convention

@@ -379,6 +379,42 @@ const ApplicationForm: React.FC<Props> = ({
const isOtherFundingSourcesPage = sectionName === 'otherFundingSources';
const isReviewPage = sectionName === 'review';

const allZoneIntake =
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a bool, we should rename this to isAllZoneIntake

Suggested change
const allZoneIntake =
const isAllZoneIntake =

Comment on lines 389 to 390
firstNationsLed: boolean,
nullAllowed: boolean = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here that bools should use the is prefix

Suggested change
firstNationsLed: boolean,
nullAllowed: boolean = true
isFirstNationsLed: boolean,
isNullAllowed: boolean = true

// display new modal saying
// Invalid selection. You have indicated that this project is not led or supported by First Nations, therefore, you may only choose from zones 1,2,3 or 6.
setProjectAreaModalType('invalid-geographic-area');
const projectAreaAccepted = isZoneSelectionValid(
Copy link
Contributor

Choose a reason for hiding this comment

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

Should stick to the is prefix for booleans

Suggested change
const projectAreaAccepted = isZoneSelectionValid(
const isProjectAreaAccepted = isZoneSelectionValid(
//could also do isValidZoneSelection

@RRanath RRanath merged commit 0fba489 into main May 3, 2024
37 of 39 checks passed
@RRanath RRanath deleted the NDT-282-Refactor-how-we-handle-project-area-modal-opening branch May 3, 2024 18:31
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