From e87403cb4c7629804a16679a3575c9220510e38a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 15:15:53 +0000 Subject: [PATCH] Add types to StackWithBorder and TeamMember, fix all typecheck errors Agent-Logs-Url: https://github.com/hackaburg/tilt/sessions/c4d1d685-f445-450c-8d14-ea628b425710 Co-authored-by: sezanzeb <28510156+sezanzeb@users.noreply.github.com> --- frontend/src/api/index.ts | 4 ++-- .../src/components/base/stack-with-border.tsx | 9 ++++++-- frontend/src/components/pages/edit-team.tsx | 22 ++++++++++++++----- frontend/src/components/pages/rating-form.tsx | 1 - 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index c6f76a42..81915174 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -29,6 +29,7 @@ import type { SuccessResponseDTO, TeamDTO, TeamResponseDTO, + TeamUpdateDTO, UserDTO, UserListDto, } from "./types/dto"; @@ -272,7 +273,7 @@ export class ApiClient { * @param team.teamImg The team's image * @param team.owner The team's owner */ - public async updateTeam(team: TeamDTO): Promise { + public async updateTeam(team: TeamUpdateDTO): Promise { await this.put( "/application/team", team, @@ -314,7 +315,6 @@ export class ApiClient { ): Promise { await this.delete( `/application/team/${teamId}/members/${userId}`, - {} as never, ); } diff --git a/frontend/src/components/base/stack-with-border.tsx b/frontend/src/components/base/stack-with-border.tsx index 6224a3a3..befbdd72 100644 --- a/frontend/src/components/base/stack-with-border.tsx +++ b/frontend/src/components/base/stack-with-border.tsx @@ -1,13 +1,18 @@ import * as React from "react"; import { Stack, Tooltip } from "@mui/material"; -// TODO types. text and tooltip are optional +interface StackWithBorderProps { + text?: string; + tooltip?: string; + children?: React.ReactNode; +} + /** * I typically use this to display some text and a few buttons, * with multiple of this on top of each other, like a table. * Maybe these components should use tables instead, idk. It looks nice. */ -export const StackWithBorder = ({ text, children, tooltip }) => { +export const StackWithBorder = ({ text, children, tooltip }: StackWithBorderProps) => { return (
void; +} + const TeamMemberRequest = ({ user, updateTeamInProgress, acceptUserToTeam, -}) => { +}: TeamMemberRequestProps) => { return (