-
Notifications
You must be signed in to change notification settings - Fork 1
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
Enums properly defined and nothing broke #16
Enums properly defined and nothing broke #16
Conversation
… wasn't sure if it needed editing.
…did not allow for bubble selection.
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.
The overall use of enums is useful here for the user for proper abstraction, ensure immutability, which is a good practice for maintaining consistent item status values across the application. This helps prevent accidental modifications of the status values, ensuring the integrity of the data.
It might be beneficial to define this as an enum for better type safety.
client-app/constants/Enums.js
Outdated
RECEIVED: 'Received' | ||
}); | ||
|
||
export default ItemStatus; |
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.
@truffer11 delete this file. All the app code should be within src/
RECEIVED: 'Received' | ||
}); | ||
|
||
export default ItemStatus; |
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.
@truffer11 Can you please rename the file toEnums.ts
. .ts
is a typescript extension. Typescript has enum
datatype (which is not there in javascript) which is very useful in our case.
@@ -100,6 +103,8 @@ const StatusDisplayPage = () => { | |||
<input | |||
type="radio" | |||
name="status" | |||
//value={ItemStatus.DONATED} | |||
//checked={donorInfo.status === ItemStatus.DONATED} | |||
checked={donorInfo.status.donated} |
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.
@truffer11 You can replace with enums in this file also.
Pull Request Template
**Fixes issue #5 **
What was changed?
Why was it changed?
How was it changed?