Conversation
There was a problem hiding this comment.
Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.
Files not reviewed (2)
- client/src/components/ErrorMessage.module.css: Language not supported
- client/src/index.css: Language not supported
Comments suppressed due to low confidence (1)
client/src/pages/scenarioSections/Investments.jsx:19
- The errors state is initialized as an array but later used as an object. Please initialize errors as {} to maintain type consistency and avoid runtime issues.
const [errors, setErrors] = useState([]);
kalongn
reviewed
Apr 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To apply the ErrorMessage component, pass it the errors state. Errors should be named appropriately for display such as
errors.lifeExpectancyfor user's life expectancy since the string will be modified and used in the error message displayed to the user. Each error is a link that should be linked to an element's id. Use the same naming as before for the id e.g.id="lifeExpectancy".To apply the styling, must import ErrorMessage.module.css and add a className to an element e.g.
className={errors.initialLimit ? errorStyles.errorInput : ""}orerrorStyles.highlight