Skip to content

Conversation

@SverreNystad
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Jul 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web-frontend Ready Ready Preview Comment Aug 18, 2025 3:55pm


import { useEffect, useRef } from "react";
import Image from "next/image";
import { FiArrowLeft, FiArrowRight, FiChevronDown } from "react-icons/fi";
Copy link
Member Author

Choose a reason for hiding this comment

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

@sandviklee should all icons be in the Icon.tsx?

This comment was marked as outdated.

@SverreNystad SverreNystad self-assigned this Jul 19, 2025
Copy link

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 pull request transforms the team page from a static member display to a dynamic showcase that supports multiple semesters and years. The implementation includes navigation between different time periods, project-based filtering, and an improved data structure.

  • Complete overhaul of team page to support historical semester/year data
  • Implementation of new data hooks for fetching members and projects with semester relationships
  • Addition of interactive UI components for year/semester selection and project filtering

Reviewed Changes

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

Show a summary per file
File Description
pages/team.tsx Complete rewrite to use new semester-based architecture with hooks
hooks/useTeamData.ts New custom hook managing semester navigation and member/project data logic
hooks/useGetMembers.tsx Refactored to fetch all members and projects instead of filtered subsets
lib/types.ts Enhanced type definitions with Project and ProjectMembership structures
components/team/YearSemesterSelector.tsx New component for banner display and semester navigation controls
components/team/ProjectSection.tsx New component for displaying project-grouped member lists
components/team/ProjectFilterChips.tsx New component for project filtering interface
components/Member/Member.tsx Updated to use new Member type structure
components/Navbar/Navbar.tsx Minor responsive padding adjustment
package.json Updated @tanstack/react-query dependency
Comments suppressed due to low confidence (1)

hooks/useTeamData.ts:7

  • The constant name 'HALF_YEAR' is ambiguous and doesn't clearly indicate it represents June or the semester cutoff point. Consider renaming to 'SEMESTER_CUTOFF_MONTH' or 'JUNE_MONTH'.
const HALF_YEAR = 6; // June

titleLabel?: string;
}

const CURRENT_YEAR = new Date().getFullYear();
Copy link

Copilot AI Jul 20, 2025

Choose a reason for hiding this comment

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

The CURRENT_YEAR constant is duplicated here and in useTeamData.ts (line 5). Consider extracting this to a shared constants file to avoid duplication and ensure consistency.

Copilot uses AI. Check for mistakes.
Comment on lines 92 to 96
project={{
...(activeProjects.find(
(p) => p.name === projectFilter
) as Project),
}}
Copy link

Copilot AI Jul 20, 2025

Choose a reason for hiding this comment

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

Using 'as Project' assertion without null checking could cause runtime errors if the project is not found. The find() method returns undefined when no match is found, which would cause the spread operator to fail.

Suggested change
project={{
...(activeProjects.find(
(p) => p.name === projectFilter
) as Project),
}}
project={
activeProjects.find((p) => p.name === projectFilter) || {
id: "unknown",
name: "Unknown Project",
description: "No matching project found.",
}
}

Copilot uses AI. Check for mistakes.
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.

2 participants