@@ -14,6 +14,7 @@ import TasksDropdown from "@/app/(protected)/immersion/_components/TasksDropdown
1414import { Badge } from "@/components/component/Badge" ;
1515import Toast from "@/components/toast/Toast" ;
1616import { Button } from "@/components/ui/button" ;
17+ import { Drawer , DrawerClose , DrawerContent } from "@/components/ui/drawer" ;
1718import { useCompleteTask , useInProgressTasks } from "@/hooks/useTasks" ;
1819import { getPersonaImage } from "@/utils/getPersonaImage" ;
1920import ArrowLeft from "@public/icons/common/arrow-left.svg" ;
@@ -92,7 +93,6 @@ export default function ImmersionPageClient({ initialTask }: Props) {
9293
9394 const handleConfirmComplete = ( ) => {
9495 completeTask ( Number ( initialTask . id ) ) ;
95- router . push ( `/immersion/complete?taskId=${ initialTask . id } ` ) ;
9696 } ;
9797
9898 const handleReflection = ( ) => {
@@ -304,14 +304,10 @@ export default function ImmersionPageClient({ initialTask }: Props) {
304304 ) }
305305
306306 { /* 할일 완료 바텀시트 */ }
307- { showBottomSheet && (
308- < div
309- className = "fixed inset -0 z-50 flex items-end justify-center bg-black bg-opacity-60 "
307+ < Drawer open = { showBottomSheet } onOpenChange = { setShowBottomSheet } >
308+ < DrawerContent
309+ className = "w-auto border -0 bg-component-gray-secondary pb-[33px] pt-2 "
310310 onClick = { handleOverlayClick }
311- onKeyDown = { handleOverlayClick }
312- tabIndex = { 0 }
313- role = "button"
314- aria-label = "바텀시트 닫기"
315311 >
316312 < div className = "flex w-full flex-col items-center rounded-t-[28px] bg-component-gray-secondary px-5 pb-[34px] pt-10" >
317313 < h2 className = "t3 text-center text-gray-normal" >
@@ -323,34 +319,36 @@ export default function ImmersionPageClient({ initialTask }: Props) {
323319 < p className = "b3 mb-7 text-center text-text-neutral" >
324320 마감까지 { remainingTime }
325321 </ p >
326- < button
327- type = "button"
328- className = "l2 w-full rounded-[16px] bg-component-accent-primary py-4 text-gray-strong"
329- onClick = { handleConfirmComplete }
330- >
331- 할일 끝내기
332- </ button >
333-
334- < button
335- type = "button"
336- className = "b2 w-full pb-2 pt-4 text-text-neutral"
337- onClick = { ( ) => setShowBottomSheet ( false ) }
338- >
339- 몰입으로 돌아가기
340- </ button >
322+ < DrawerClose asChild >
323+ < Link href = { `/immersion/complete?taskId=${ initialTask . id } ` } >
324+ < button
325+ type = "button"
326+ className = "l2 w-full rounded-[16px] bg-component-accent-primary py-4 text-gray-strong"
327+ onClick = { handleConfirmComplete }
328+ >
329+ 할일 끝내기
330+ </ button >
331+ </ Link >
332+ </ DrawerClose >
333+ < DrawerClose asChild >
334+ < button
335+ type = "button"
336+ className = "b2 w-full pb-2 pt-4 text-text-neutral"
337+ onClick = { ( ) => setShowBottomSheet ( false ) }
338+ >
339+ 몰입으로 돌아가기
340+ </ button >
341+ </ DrawerClose >
341342 </ div >
342- </ div >
343- ) }
343+ </ DrawerContent >
344+ </ Drawer >
344345
345346 { /* 시간 만료 바텀시트 */ }
346347 { showTimeExpiredSheet && (
347348 < div
348349 className = "fixed inset-0 z-50 flex items-end justify-center bg-black bg-opacity-60"
349350 onClick = { handleTimeExpiredOverlayClick }
350351 onKeyDown = { handleTimeExpiredOverlayClick }
351- tabIndex = { 0 }
352- role = "button"
353- aria-label = "시간 만료 바텀시트 닫기"
354352 >
355353 < div className = "flex w-full flex-col items-center rounded-t-[28px] bg-component-gray-secondary px-5 pb-[34px] pt-6" >
356354 < h2 className = "t3 mt-4 text-center text-gray-normal" >
0 commit comments