From 0dda7f972261a0dffee0bc6a8468c10a4b291ce5 Mon Sep 17 00:00:00 2001 From: hjy0951 Date: Thu, 5 Sep 2024 18:24:10 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=86=8C=EC=8B=9D=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=EC=84=9C=20=EC=9D=91=EC=9B=90=20=EC=9D=B4?= =?UTF-8?q?=ED=9B=84=20=ED=95=B4=EB=8B=B9=20=EA=B8=B0=EB=A1=9D=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/news/components/atoms/cheer-up-button.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/features/news/components/atoms/cheer-up-button.tsx b/features/news/components/atoms/cheer-up-button.tsx index 6f0751f4..d71e808a 100644 --- a/features/news/components/atoms/cheer-up-button.tsx +++ b/features/news/components/atoms/cheer-up-button.tsx @@ -1,3 +1,7 @@ +'use client'; + +import { useRouter } from 'next/navigation'; + import { Button } from '@/components/atoms'; import { CheerBottomSheet, CheerProgress } from '@/components/molecules'; import { useCheerBottomSheet } from '@/hooks'; @@ -9,6 +13,7 @@ interface CheerUpButtonProps { } export const CheerUpButton = ({ memoryId, nickname }: CheerUpButtonProps) => { + const router = useRouter(); const { cheerList, selectedCheerItem, @@ -22,6 +27,11 @@ export const CheerUpButton = ({ memoryId, nickname }: CheerUpButtonProps) => { memoryId, }); + const handleChangeOpen = (isOpen: boolean) => { + handleChangeSelectedItem(isOpen); + router.push(`/record-detail/${memoryId}`); + }; + return ( <>