Skip to content

Commit

Permalink
Fix type and bidding table issues (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarlovieri authored Oct 14, 2024
1 parent 73ee006 commit 1f39177
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/app/components/BiddingTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const BiddingTable: React.FC<BiddingList> = ({user, userBids, refetchUserBids, b
<DialogTitle>Biddings for Number {selectedNumber}</DialogTitle>
</DialogHeader>
<h1> Your Points : {userBids.info.points}</h1>
{selectedNumber && biddings && biddings[selectedNumber] && (
{ biddings && biddings[selectedNumber] && (
<div className="flex flex-row justify-between">
<div>Quota M: {biddings[selectedNumber].quota.male}</div>
<div>Quota F: {biddings[selectedNumber].quota.female}</div>
Expand All @@ -314,15 +314,15 @@ const BiddingTable: React.FC<BiddingList> = ({user, userBids, refetchUserBids, b
</TableRow>
</TableHeader>
<TableBody>
{selectedNumber &&
{
biddings[selectedNumber] &&
biddings[selectedNumber].male.map((bid, index) => (
<TableRow key={index}>
<TableCell>{bid.user} (M)</TableCell>
<TableCell>${bid.amount.toFixed(2)}</TableCell>
</TableRow>
))}
{selectedNumber &&
{
biddings[selectedNumber] &&
biddings[selectedNumber].female.map((bid, index) => {
return (
Expand Down
10 changes: 0 additions & 10 deletions src/app/dashboard/jersey/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,30 @@ export interface UserInfo {
points: number;
isAllocated: boolean;
jersey?: JerseyType; // Only present if isAllocated is true
<<<<<<< HEAD
teams: Team[];
=======
teams: TeamContainer[];
>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf
}

export interface JerseyType {
number: number;
quota: Quota;
}

<<<<<<< HEAD
=======
export interface EligibleBids {
jerseys: number[];
}

>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf
export interface Quota {
male: number;
female: number;
}

interface Team {
name: string;
<<<<<<< HEAD
=======
shareable: boolean;
}

interface TeamContainer {
team: Team;
>>>>>>> 81df05bbaae3cbaa3ef923043f4dd1a0af505bbf
}

interface Bid {
Expand Down

0 comments on commit 1f39177

Please sign in to comment.