Skip to content

Commit

Permalink
fix :: add key
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Apr 16, 2024
1 parent 53c9c95 commit 5703497
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/Team/TeamContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { theme } from '@/style/theme';
import styled from '@emotion/styled';
import { Tag } from './Tag';
import React from 'react';

type TagType = 'club' | 'team' | 'alone' | 'etc';

Expand All @@ -25,15 +26,17 @@ export const TeamContainer = ({ name, admin, deploy, tag }: TeamType) => {
switch (index) {
case 0:
return (
<>
<React.Fragment key={index}>
{element}
{deploy.length > 1 && ', '}
</>
</React.Fragment>
);
case 1:
return <>{element} </>;
return <React.Fragment key={index}>{element} </React.Fragment>;
case 2:
return <>{deploy.length > 2 ? <>{deploy.length - 2}</> : <></>}</>;
return (
<React.Fragment key={index}>{deploy.length > 2 ? <>{deploy.length - 2}</> : <></>}</React.Fragment>
);
default:
return null;
}
Expand Down

0 comments on commit 5703497

Please sign in to comment.