Skip to content

Commit

Permalink
fix: Editable 상태에서도 부착된 스티커 보이게 수정.
Browse files Browse the repository at this point in the history
  • Loading branch information
eunbeann committed Jan 14, 2024
1 parent d555e94 commit c2688b8
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/Detail/components/ZigZagView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ function ZigZagView({
<SmallLecueNote {...note} noteList={noteList} />
</S.LecueNoteContainer>
))}
{isEditable ? (
<S.StickerContainer>
{postedStickerList.map((data) => (
<Draggable
nodeRef={nodeRef}
key={data.postedStickerId}
positionOffset={{ x: data.positionX, y: data.positionY }}
onStart={() => false}
>
<S.Sticker ref={nodeRef} stickerImage={data.stickerImage} />
</Draggable>
))}
</S.StickerContainer>
{isEditable && (
<S.StickerContainer>
<Draggable
defaultPosition={{
Expand All @@ -43,19 +55,6 @@ function ZigZagView({
<S.Sticker ref={nodeRef} stickerImage={stickerState.stickerImage} />
</Draggable>
</S.StickerContainer>
) : (
<S.StickerContainer>
{postedStickerList.map((data) => (
<Draggable
nodeRef={nodeRef}
key={data.postedStickerId}
positionOffset={{ x: data.positionX, y: data.positionY }}
onStart={() => false}
>
<S.Sticker ref={nodeRef} stickerImage={data.stickerImage} />
</Draggable>
))}
</S.StickerContainer>
)}
</S.ZigZagViewWrapper>
);
Expand Down

0 comments on commit c2688b8

Please sign in to comment.