Skip to content

Commit

Permalink
Fix: map rendering 시 key 값 부여
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunji-lee99 committed Nov 15, 2023
1 parent 7dc73f3 commit dadec42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/Board/BoardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export function BoardList() {
},[])

function RenderBoardContent(){
const ReturnRenderBoardContentboard=board?.map((data)=>{
const ReturnRenderBoardContentboard=board?.map((data,id)=>{
return(
<BoardContent author={data.author} content={data.content}></BoardContent>
<BoardContent key={id} author={data.author} content={data.content}></BoardContent>
);
})
return ReturnRenderBoardContentboard;
Expand Down
4 changes: 2 additions & 2 deletions src/components/Project/ProjectImageSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ function ProjectImageSlider(prop:ProjectImageSliderProp) {
}

const RenderImage=()=>{
const ReturnRenderImage=prop.imageList.map((image)=>{
const ReturnRenderImage=prop.imageList.map((image,id)=>{
return(
<ImageDiv>
<ImageDiv key={id}>
<Image src={image}></Image>
</ImageDiv>
)
Expand Down
4 changes: 2 additions & 2 deletions src/components/Skill/SkillDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ export function SkillDetail(subject:SkillDetailProps){
Data=EtcSkillSet;
}
const ReturnRenderData=Data.map(
(data)=>{
(data,id)=>{
return (
<SkillLogoAndName>
<SkillLogoAndName key={id}>
<SkillLogo src={data.img}></SkillLogo>
<SkillName>{data.title}</SkillName>
</SkillLogoAndName>
Expand Down

0 comments on commit dadec42

Please sign in to comment.