import {useEffect, useState} from "react"; import TeamListItem from "./TeamListItem"; import EditTeamModal from "./EditTeamModal"; import MemberInvitationModal from "./MemberInvitationModal"; export default function TeamList(props) { const [ showMemberInvitationModal, setShowMemberInvitationModal ] = useState(false); const [ showEditTeamModal, setShowEditTeamModal ] = useState(false); const [ team, setTeam ] = useState(null); const selectAction = (action: string, team: any) => { setTeam(team); switch (action) { case 'edit': setShowEditTeamModal(true); break; case 'invite': setShowMemberInvitationModal(true); break; } }; return (
{showEditTeamModal && setShowEditTeamModal(false)}>} {showMemberInvitationModal && setShowMemberInvitationModal(false)}> }
); }