Skip to content

fix editing team details#474

Merged
michelleyeoh merged 6 commits intomainfrom
465-fix-editing-team-details
Apr 9, 2026
Merged

fix editing team details#474
michelleyeoh merged 6 commits intomainfrom
465-fix-editing-team-details

Conversation

@michelleyeoh
Copy link
Copy Markdown
Contributor

No description provided.

@michelleyeoh michelleyeoh linked an issue Apr 8, 2026 that may be closed by this pull request
@michelleyeoh michelleyeoh requested a review from Copilot April 8, 2026 21:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the admin teams UI to improve the “edit team” workflow, primarily by ensuring the edit action scrolls the user to the form and by normalizing judges data so the TeamForm can render/submit consistently.

Changes:

  • Add an handleEditTeam helper to set the form data and scroll the view to the form when editing a team.
  • Normalize data.judges in TeamForm to consistently use full Judge objects (and validate/submit against the normalized data).
  • Adjust JudgeCard rendering to avoid React key issues when a team may not have an _id.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
app/(pages)/admin/teams/page.tsx Adds an edit handler that sets form state and scrolls the page/list to the top.
app/(pages)/admin/_components/Teams/TeamForm.tsx Normalizes judges data for rendering/submission and validates using a derived formData.
app/(pages)/admin/_components/Judges/JudgeCard.tsx Changes team list item keys to reduce key collisions when _id is missing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@michelleyeoh michelleyeoh merged commit 3f42b98 into main Apr 9, 2026
6 checks passed
@michelleyeoh michelleyeoh deleted the 465-fix-editing-team-details branch April 9, 2026 06:36
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.

Fix editing team details

2 participants