diff --git a/client/src/app/garden/[id]/page.tsx b/client/src/app/garden/[id]/page.tsx index cfccfd5c..5f82af07 100644 --- a/client/src/app/garden/[id]/page.tsx +++ b/client/src/app/garden/[id]/page.tsx @@ -5,11 +5,14 @@ import useUserStore from '@/stores/userStore'; import useSyncGarden from '@/hooks/useSyncGarden'; -import LoadingNotice from '@/components/common/LoadingNotice'; -import ErrorNotice from '@/components/common/ErrorNotice'; -import ShareModal from '@/components/common/ShareModal'; -import ShareButton from '@/components/common/ShareButton'; -import Footer from '@/components/common/Footer'; +import { + CommonButton, + ErrorNotice, + Footer, + LoadingNotice, + ShareButton, + ShareModal, +} from '@/components/common'; import { GardenMap, GardenSidebar, @@ -19,6 +22,7 @@ import { PurchaseInfoModal, PurchaseModal, EmptyInventoryModal, + GuestbookModal, } from '@/components/garden'; interface GardenProps { @@ -26,7 +30,7 @@ interface GardenProps { } export default function Garden({ params }: GardenProps) { - const { isOpen, type } = useModalStore(); + const { isOpen, type, changeType, open } = useModalStore(); const { userId } = useUserStore(); const { isLoading, isError } = useSyncGarden(params.id); @@ -39,10 +43,16 @@ export default function Garden({ params }: GardenProps) { if (type === 'purchase') return ; if (type === 'emptyInventory') return ; if (type === 'share') return ; + if (type === 'guestbook') return ; }; const isOwner = userId === params.id; + const handleGuestbook = () => { + changeType('guestbook'); + open(); + }; + return ( <>
@@ -64,11 +74,17 @@ export default function Garden({ params }: GardenProps) { )}
-
- -
+ {!isLoading && !isError && ( +
+ + + 방명록 + +
+ )} {isOpen && renderModal(type)} +