diff --git a/src/app/search/page.tsx b/src/app/search/page.tsx index 3074a33..82462c4 100644 --- a/src/app/search/page.tsx +++ b/src/app/search/page.tsx @@ -22,24 +22,22 @@ export default function SearchResults({ searchParams }: Props) { ]) as LectureRecommendations; const requestParam: SearchLectureParams = { - keyword: searchParams.keyword ?? '', + keyword: decodeURIComponent(searchParams.keyword ?? ''), limit: searchParams.limit ? Number(searchParams.limit) : LIMIT_PER_FETCH, next_page_token: '', filter: searchParams.filter ? searchParams.filter : 'all' }; - const decodedKeyword = decodeURIComponent(requestParam.keyword); - useLayoutEffect(() => { window.scrollTo({ top: 0 }); }, []); return ( <> - {getPageTitle(`'${decodedKeyword}' 검색 결과`)} + {getPageTitle(`'${requestParam.keyword}' 검색 결과`)}
- + { const params: SearchLectureParams = { ...requestParam, + keyword: encodeURIComponent(requestParam.keyword), next_page_token, filter };