diff --git a/components/main/PartyPreview.tsx b/components/main/PartyPreview.tsx index d9f8beb17..3f325cf92 100644 --- a/components/main/PartyPreview.tsx +++ b/components/main/PartyPreview.tsx @@ -1,18 +1,27 @@ +import { useRouter } from 'next/router'; import usePartyRoomList from 'hooks/party/usePartyRoomList'; import styles from 'styles/main/PartyPreview.module.scss'; export default function PartyPreview() { const { partyRooms } = usePartyRoomList(); - const limitedRooms = partyRooms.slice(0, 3); + const openRooms = partyRooms.filter((room) => room.status === 'OPEN'); + const limitedRooms = openRooms.slice(0, 3); + const router = useRouter(); + + const movePartyRoom = (roomId: number) => { + router.push(`/party/${roomId}`); + }; return ( -
+