Skip to content

Enhancement: update reducers for team creation, deletion, and modification.#2

Open
NathanWEdwards wants to merge 1 commit intocodeforbtv:productionfrom
NathanWEdwards:enhancement/team-reducers
Open

Enhancement: update reducers for team creation, deletion, and modification.#2
NathanWEdwards wants to merge 1 commit intocodeforbtv:productionfrom
NathanWEdwards:enhancement/team-reducers

Conversation

@NathanWEdwards
Copy link
Copy Markdown

When a user creates, deletes, or modifies a team, changes may not immediately appear on the Home and Leaderboard screens.

The teams and profile reducers should handle SAVE_TEAM_SUCCESS and DELETE_TEAM_SUCCESS to update state.teams.teams.

Teams Reducers

  • CREATE_TEAM_SUCCESS adds a new team to state.team.teams
  • DELETE_TEAM_SUCCESS removes state.teams.teams[team.id] and clears selectedTeam
  • SAVE_TEAM_SUCCESS updates state.teams.teams[team.id]

Profile Reducers

  • CREATE_TEAM_SUCCESS adds a new team entry to state.profile.teams
  • DELETE_TEAM_SUCCESS removes the team entry from state.profile.teams

Action Creators

  • createTeam dispatches CREATE_TEAM_SUCCESS
  • saveTeam dispatches the full team object
  • deleteTeam dispatches DELETE_TEAM_SUCCESS with a teamId for removal

Firebase Data Layer

  • createTeam returns the teamId for CREATE_TEAM_SUCCESS dispatches
  • deleteTeam removes listeners have a team has been deleted

@NathanWEdwards NathanWEdwards marked this pull request as ready for review April 3, 2026 05:13
@NathanWEdwards NathanWEdwards changed the title Enhancement: add reducers for team creation, deletion, and modification. Enhancement: update reducers for team creation, deletion, and modification. Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant