Create / Edit Team
Overview
Creating and Editing team utilize the TeamFormModal
as UI and its corresponding logic within the useTeamForm
custom hook.
TeamFormModal
component provides a form for creating or editing a team. It uses the useTeamForm
custom hook to manage form state and handle form submission. The form includes fields for the team name, team leader, and team members. The team leader and team members fields are populated with options fetched by the useTeamForm
hook.
Parameters
initialValues
(optional): An object that matches the ITeamForm
interface. This object can have name, owner, and members properties to set initial values for the corresponding form fields.
Notes
warning
To create/edit team, don't call the TeamFormModal
component directly, use useTeamModal
instead.