Skip to content

Commit

Permalink
Refactor: 이미지 주소도 넘기도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
navyjeongs committed Sep 9, 2023
1 parent d0e1553 commit 5412d49
Showing 1 changed file with 32 additions and 25 deletions.
57 changes: 32 additions & 25 deletions src/components/Sidebar/ChannelBar/ChannelBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,31 +38,38 @@ const ChannelBar = ({ channels, updateSelectedChannel }: ChannelBarProps) => {
{(provided, snapshot) => (
<DropContainer ref={provided.innerRef} {...provided.droppableProps}>
{channels &&
channels.map(({ channelLink, title, category, customChannelIndex }, index) => (
<Draggable draggableId={'channel-' + channelLink} index={index} key={channelLink}>
{(provided, snapshot) => (
<div
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
css={css`
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
`}
onClick={() => updateSelectedChannel(channelLink)}
>
<ChannelCircle
channelLink={channelLink}
title={title}
category={category}
customChannelIndex={customChannelIndex}
/>
</div>
)}
</Draggable>
))}
channels.map(
({ channelLink, title, gameCategory, customChannelIndex, imgSrc }, index) => (
<Draggable
draggableId={'channel-' + channelLink}
index={index}
key={channelLink}
>
{(provided, snapshot) => (
<div
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
css={css`
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
`}
onClick={() => updateSelectedChannel(channelLink)}
>
<ChannelCircle
channelLink={channelLink}
title={title}
gameCategory={gameCategory}
customChannelIndex={customChannelIndex}
imgSrc={imgSrc}
/>
</div>
)}
</Draggable>
),
)}
{provided.placeholder}
</DropContainer>
)}
Expand Down

0 comments on commit 5412d49

Please sign in to comment.