Skip to content

Commit

Permalink
Remove unnecessary key props to react elements
Browse files Browse the repository at this point in the history
These were added in 328c7f1 as part of
a debugging effort to get to the bottom of why react was raising an
error about missing key props. The root cause actually turned out to be
missing key props on the element surrounding the contact info (see
328c7f1 for the fix), but these are
leftover from then.
  • Loading branch information
Robert Main committed Jul 20, 2021
1 parent 121ad8a commit 9ad9d3e
Showing 1 changed file with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ const NonClassMeetingsTable: FunctionComponent<NonClassMeetingsTableProps> = ({
</TableHeadingCell>
</TableRow>
<TableRow isStriped>
<TableHeadingCell key="area">Area</TableHeadingCell>
<TableHeadingCell key="title">Title</TableHeadingCell>
<TableHeadingCell key="expectedSize">Expected Size</TableHeadingCell>
<TableHeadingCell key="notes">Notes</TableHeadingCell>
<TableHeadingCell key="contactInfo">Contact Info</TableHeadingCell>
<TableHeadingCell key="springRoom">Room</TableHeadingCell>
<TableHeadingCell key="fallRoom">Room</TableHeadingCell>
<TableHeadingCell key="detail">Detail</TableHeadingCell>
<TableHeadingCell key="editMeeting">Edit Meeting</TableHeadingCell>
<TableHeadingCell>Area</TableHeadingCell>
<TableHeadingCell>Title</TableHeadingCell>
<TableHeadingCell>Expected Size</TableHeadingCell>
<TableHeadingCell>Notes</TableHeadingCell>
<TableHeadingCell>Contact Info</TableHeadingCell>
<TableHeadingCell>Room</TableHeadingCell>
<TableHeadingCell>Room</TableHeadingCell>
<TableHeadingCell>Detail</TableHeadingCell>
<TableHeadingCell>Edit Meeting</TableHeadingCell>
</TableRow>
</TableHead>
<TableBody>
Expand All @@ -112,11 +112,11 @@ const NonClassMeetingsTable: FunctionComponent<NonClassMeetingsTableProps> = ({
fall,
}, index) => (
<TableRow isStriped={index % 2 !== 0} key={id}>
<TableCell backgroundColor={getAreaColor(area)} key={`area-${id}`}>{area}</TableCell>
<TableCell key={`title-${id}`}>{title}</TableCell>
<TableCell key={`expectedSize-${id}`}>{expectedSize}</TableCell>
<TableCell key={`notes-${id}`}>{notes}</TableCell>
<TableCell key={`contactInfo-${id}`}>
<TableCell backgroundColor={getAreaColor(area)}>{area}</TableCell>
<TableCell>{title}</TableCell>
<TableCell>{expectedSize}</TableCell>
<TableCell>{notes}</TableCell>
<TableCell>
{
/*
* This is being used instead of just outputting the fields
Expand All @@ -138,7 +138,7 @@ const NonClassMeetingsTable: FunctionComponent<NonClassMeetingsTableProps> = ({
.map((info) => (<p key={info}>{info}</p>))
}
</TableCell>
<TableCell key={`fallMeetings-${id}`}>
<TableCell>
<CellLayout>
<TableCellList>
{fall.meetings.map(({
Expand Down Expand Up @@ -170,15 +170,14 @@ const NonClassMeetingsTable: FunctionComponent<NonClassMeetingsTableProps> = ({
</TableCellList>
<BorderlessButton
id={`${id}-${spring.term}-edit-meetings-button`}
key={`${id}-${spring.term}-edit-meetings-button`}
onClick={() => {}}
variant={VARIANT.INFO}
>
<FontAwesomeIcon icon={faEdit} />
</BorderlessButton>
</CellLayout>
</TableCell>
<TableCell key={`springMeetings-${id}`}>
<TableCell>
<CellLayout>
<TableCellList>
{spring.meetings.map(({
Expand Down Expand Up @@ -210,7 +209,6 @@ const NonClassMeetingsTable: FunctionComponent<NonClassMeetingsTableProps> = ({
</TableCellList>
<BorderlessButton
id={`${id}-${spring.term}-edit-meetings-button`}
key={`${id}-${spring.term}-edit-meetings-button`}
onClick={() => {}}
variant={VARIANT.INFO}
>
Expand Down

0 comments on commit 9ad9d3e

Please sign in to comment.