Skip to content

Commit 0eb1706

Browse files
authored
Merge pull request #125 from CoPlay-FE/feature/dashboard_id
🐛 fix: 반응형 수정, 댓글UI에 줄바꿈 반영, 카드수정모달-이미지 변경 시 shouldDirty
2 parents 447f054 + 0224665 commit 0eb1706

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

src/app/dashboard/[id]/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,19 @@ export default function DashboardID() {
147147
<>
148148
<div className="h-screen select-none">
149149
<div
150-
className="flex min-h-screen mobile:flex-col tablet:flex-col"
150+
className="BG-gray flex min-h-screen mobile:flex-col tablet:flex-col"
151151
onTouchStart={handleTouchStart}
152152
onTouchMove={handleTouchMove}
153153
onTouchEnd={handleTouchEnd}
154154
>
155155
{columns?.map((column) => (
156156
<Column key={column.id} column={column} dashboardId={dashboardId} />
157157
))}{' '}
158-
<div className="BG-gray Border-column p-20 mobile:h-full mobile:w-308 mobile:border-t-2 tablet:h-full tablet:w-584 tablet:border-t-2">
158+
{/* <div className="BG-gray Border-column p-20 mobile:h-full mobile:w-308 mobile:border-t-2 tablet:h-full tablet:w-584 tablet:border-t-2"> */}
159+
<div className="BG-gray Border-column p-20 pt-84 mobile:size-full mobile:border-t-2 mobile:pt-20 tablet:size-full tablet:border-t-2 tablet:pt-20">
159160
<button
160-
className="BG-white Border-btn m flex justify-center gap-12 whitespace-nowrap rounded-8 px-85 pb-20 pt-24 text-18 font-bold mobile:flex mobile:w-full mobile:justify-center mobile:px-50 mobile:py-20 mobile:text-16 tablet:flex tablet:w-full tablet:items-center"
161+
// className="BG-white Border-btn m flex justify-center gap-12 whitespace-nowrap rounded-8 px-85 pb-20 pt-24 text-18 font-bold mobile:flex mobile:w-full mobile:justify-center mobile:px-50 mobile:py-20 mobile:text-16 tablet:flex tablet:w-full tablet:items-center"
162+
className="BG-white Border-btn m flex justify-center gap-12 whitespace-nowrap rounded-8 px-85 pb-20 pt-24 text-18 font-bold mobile:flex mobile:size-full mobile:justify-center mobile:px-50 mobile:py-20 mobile:text-16 tablet:flex tablet:w-full tablet:items-center"
161163
onClick={handleCreateColumn}
162164
>
163165
<span>새로운 컬럼 추가하기</span>

src/app/features/dashboard_Id/Card/cardFormModals/ModifyCardForm.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,13 @@ export default function ModifyCardForm({
7676
})
7777

7878
// React Hook Form 과 tags 값 연결
79+
// 💥 트러블슈팅: 태그수정해도 isDirty가 잡히지 않아서, shouldDirty를 추가하여 해결(배열 주소는 그대로니까..)
7980
useEffect(() => {
8081
setValue('tags', tags, { shouldDirty: true })
8182
}, [tags, tags.length, setValue])
83+
// useEffect(() => {
84+
// {shouldDirty: true }
85+
// }, [preview])
8286

8387
// 상태(컬럼) 선택 시 / assignee 선택 시 드롭다운 닫기
8488
useEffect(() => {
@@ -99,7 +103,7 @@ export default function ModifyCardForm({
99103
{ columnId, file },
100104
{
101105
onSuccess: ({ imageUrl }) => {
102-
setValue('imageUrl', imageUrl)
106+
setValue('imageUrl', imageUrl, { shouldDirty: true })
103107
setPreview(imageUrl)
104108
},
105109
},

src/app/features/dashboard_Id/Card/cardModal/Comment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default function Comment({ comment }: { comment: CommentType }) {
4444
content={comment.content}
4545
/>
4646
) : (
47-
<p className="text-14">{comment.content}</p>
47+
<p className="whitespace-pre-line text-14">{comment.content}</p>
4848
)}
4949
{!modifyComment && (
5050
<div className="Text-gray-light active:Text-btn flex gap-14 text-12 font-normal underline underline-offset-2 mobile:gap-8 tablet:gap-12">

src/app/features/dashboard_Id/Column/Column.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function Column({
5353

5454
if (isLoading)
5555
return (
56-
<div className="BG-gray Border-column w-354 shrink-0 p-20 pt-103 mobile:w-308 tablet:w-584">
56+
<div className="BG-gray Border-column flex w-354 shrink-0 flex-col gap-16 p-20 pt-104 mobile:h-190 mobile:w-full tablet:h-190 tablet:w-full">
5757
<div className="BG-white size-full"></div>
5858
</div>
5959
) // 스켈레톤 적용???⭐️
@@ -87,7 +87,9 @@ export default function Column({
8787
}}
8888
data-column-id={id}
8989
className={cn(
90-
'BG-gray Border-column flex w-354 shrink-0 flex-col gap-16 p-20 mobile:w-308 tablet:w-584',
90+
// 'BG-gray Border-column flex w-354 shrink-0 flex-col gap-16 p-20 mobile:w-308 tablet:w-584',
91+
'BG-gray Border-column flex w-354 shrink-0 flex-col gap-16 p-20 mobile:w-full tablet:w-full',
92+
9193
{
9294
'BG-drag-hovered': isDraggingover,
9395
},

0 commit comments

Comments
 (0)