From b64a9e62011d4a127c88ff8a0a0073434e1a7ac1 Mon Sep 17 00:00:00 2001 From: qkrdmstlr3 Date: Sat, 14 Sep 2024 03:05:40 +0900 Subject: [PATCH] =?UTF-8?q?feat(search):=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/container/SearchDialog/SearchDialog.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/container/SearchDialog/SearchDialog.tsx b/src/container/SearchDialog/SearchDialog.tsx index b549a7e..eeeb0e8 100644 --- a/src/container/SearchDialog/SearchDialog.tsx +++ b/src/container/SearchDialog/SearchDialog.tsx @@ -10,6 +10,7 @@ import { EasterEgg } from './EasterEgg'; import { useState } from 'react'; import { AsyncBoundaryWithQuery } from '@/lib'; import { If } from '@/system/utils/If'; +import { useRouter } from 'next/navigation'; interface SearchDialogProps { open: boolean; @@ -19,6 +20,7 @@ interface SearchDialogProps { function Content({ onClose }: SearchDialogProps) { const { data, mutate } = useGetSearchCards(); const [showEaster, setShowEaster] = useState(false); + const router = useRouter(); return (
@@ -36,10 +38,13 @@ function Content({ onClose }: SearchDialogProps) { />
- {data?.data.map((info) => )} + {data?.data.map((info) => ( + router.push(`/write/${info.id}`)} /> + ))}
{showEaster && } +
ho
); }