Skip to content

#4087 individual teamtype page#4138

Merged
chpy04 merged 7 commits intodevelopfrom
#4087-Individual-Teamtype-Page
Apr 9, 2026
Merged

#4087 individual teamtype page#4138
chpy04 merged 7 commits intodevelopfrom
#4087-Individual-Teamtype-Page

Conversation

@EdgarButtner
Copy link
Copy Markdown
Contributor

@EdgarButtner EdgarButtner commented Apr 4, 2026

Changes

Added a GuestDivisionPage with a GuestTeamPage and a GuestSubteamCard. The GuestTeamPage renders GuestSubteamCards as needed. I also needed to change Team.tsx to make sure the right TeamSpecificPage was rendered.

Notes

Might want to change some filenames. For example GuestSubteamCard might be better as GuestTeamTypeCard but idk if we want to stick to.

Test Cases

No tests needed. (I think)

Screenshots

Img for fullscreen subteam:
Screenshot 2026-04-04 at 7 49 29 PM

Img for mobile subteam:
Screenshot 2026-04-04 at 7 50 06 PM

Img for specific subteam page (guest version):
Screenshot 2026-04-04 at 7 49 45 PM

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes # (issue #)
#4087

@EdgarButtner EdgarButtner force-pushed the #4087-Individual-Teamtype-Page branch from fdbc462 to 5e596fc Compare April 5, 2026 01:44
@staysgt staysgt self-requested a review April 5, 2026 17:07
Copy link
Copy Markdown
Contributor

@staysgt staysgt left a comment

Choose a reason for hiding this comment

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

Just a few pretty small comments, looks great overall!

const GuestTeamPage: React.FC<GuestTeamPageProps> = ({ teamTypeId }) => {
const isMobilePortrait = useMediaQuery('(max-width:480px)');
const { isLoading: teamsIsLoading, isError: teamsIsError, data: allTeams, error: teamsError } = useAllTeams();
const teams = allTeams?.filter((team) => team.teamType?.teamTypeId === teamTypeId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you need to move the filtering logic down a few lines after we check that allTeams exists. I'm getting this error when there are no teams associated with a team type, it shouldn't be displaying this error, because there isn't an error, theres just no teams associated with the division.

Image

const TeamOrDivisionPage: React.FC = () => {
const { teamId } = useParams<{ teamId: string }>();
const user = useCurrentUser();
const { data: teamTypes } = useAllTeamTypes();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you destructure this fully, so we have the whole { isLoading: teamsLoading, isError: isTeamsError, data: teams, error: teamsError } + the conditional checks

import { NERButton } from '../../components/NERButton';
import { Link as RouterLink } from 'react-router-dom';

interface TeamTypeCardProps {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you rename this to GuestSubteamCardProps instead

staysgt
staysgt previously approved these changes Apr 5, 2026
Copy link
Copy Markdown
Contributor

@staysgt staysgt left a comment

Choose a reason for hiding this comment

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

Good job!

@staysgt staysgt requested a review from chpy04 April 5, 2026 18:38
Copy link
Copy Markdown
Contributor

@chpy04 chpy04 left a comment

Choose a reason for hiding this comment

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

hell yeah

@chpy04 chpy04 merged commit 3932dc3 into develop Apr 9, 2026
4 checks passed
@chpy04 chpy04 deleted the #4087-Individual-Teamtype-Page branch April 9, 2026 13:05
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.

3 participants