WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
385 stars 600 forks source link

Updated course_creation_settings_form.jsx with latest react Rules #5874

Open abhay-dev2901 opened 6 days ago

abhay-dev2901 commented 6 days ago

What this PR does

This PR updates the CourseCreationSettingsForm.jsx component to comply with the latest React rules and best practices.

The main changes include:

  1. Refactoring the component to use React hooks (useState and useEffect) for managing state and side effects.
  2. Ensuring the form state is correctly synchronized with the incoming settings prop.
  3. Adding PropTypes to enforce the expected types for the component props.

Issue Addressed

This PR addresses issue by ensuring the CourseCreationSettingsForm component is up-to-date with the latest React standards, improving maintainability and readability.

Screenshots Before: WhatsApp Image 2024-07-01 at 6 41 30 PM

After: WhatsApp Image 2024-07-01 at 6 41 58 PM

Open questions and concerns

Is there any specific validation required for the form inputs that should be added? Are there additional fields that need to be included in the form based on recent changes or requirements? Are there any performance implications of using hooks in this particular component that should be considered?

ragesoss commented 6 days ago

These screenshots are not showing the updated component. It is part of the /settings view.