Skip to content

Commit

Permalink
fix : 검색어는 trim 한 결과값으로만 요청한다
Browse files Browse the repository at this point in the history
  • Loading branch information
wade3420 committed Jan 31, 2024
1 parent cee3469 commit b26312b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { css } from '@/styled-system/css';

function SearchPage() {
const [input, setInput] = useState('');
const filteredInput = input.trim();
return (
<>
<SearchBar placeholder="닉네임을 검색해 주세요." value={input} onChange={setInput} />
Expand All @@ -25,7 +26,7 @@ function SearchPage() {
</>
}
>
<List nickname={input} />
<List nickname={filteredInput} />
</Suspense>
</>
);
Expand Down

0 comments on commit b26312b

Please sign in to comment.