As an user, I should see a delete button on each team card within the Teams component and when I click a delete button that team should be removed from firebase and the Teams component should updated.
Acceptance Criteria
WHEN the user clicks the "x" delete button on the team card
THEN the deleted card will be removed from the Firebase
AND the Team component will be updated
Dev Notes
In src/helpers/Data/teamData.js create the axios.delete function to target the team cards by id
-In src/components/pages/Teams/Teams.js import Team at the top of the file
Import teamData at the top of file (to retrieve the axios call)
Create a deleteTeam function that calls the teamData.deleteTeam(id) function and then recalls the data from firebase
Pass the deleteTeam function as a prop in the Team div
In src/components/shared/Team/Team.js add the "x" delete button to the bootstrap card which will display in the upper right hand corner of the card.
Import PropTypes at the top of the file
Include the deleteTeam function as a PropType.func
Create deleteTeamEvent function that creates the variable props and then calls the deleteTeam(team.id) function.
Create the onClick event that will call deleteTeamEvent once the "x" close button is clicked
User Story
As an user, I should see a delete button on each team card within the Teams component and when I click a delete button that team should be removed from firebase and the Teams component should updated.
Acceptance Criteria
WHEN the user clicks the "x" delete button on the team card THEN the deleted card will be removed from the Firebase AND the Team component will be updated
Dev Notes
-In src/components/pages/Teams/Teams.js import Team at the top of the file
deleteTeam
function that calls the teamData.deleteTeam(id) function and then recalls the data from firebasedeleteTeam
function as a prop in the Team divPropType.func
deleteTeamEvent
function that creates the variable props and then calls thedeleteTeam(team.id)
function.deleteTeamEvent
once the "x" close button is clicked