Skip to content

Commit

Permalink
πŸ”§ fix: 검색 였λ₯˜ μˆ˜μ •
Browse files Browse the repository at this point in the history
κ²€μƒ‰μ–΄λ‘œ ttν˜Ήμ€ γ……γ……λ₯Ό μž…λ ₯ν•  경우 일정 μ‹œκ°„μ΄ 흐λ₯Έ ν›„ μ—λŸ¬κ°€ λ‚˜λŠ” 문제 ν•΄κ²°
  • Loading branch information
dannysir committed Dec 5, 2024
1 parent 6c3602f commit 8106b27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions FE/src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function SearchModal() {

// κ²°κ³Όκ°€ μ—†μœΌλ©΄ λ³€ν™˜λœ κ²€μƒ‰μ–΄λ‘œ 검색
if (originalResults.length === 0 && convertedSearch) {
return getSearchResults(formatNoSpecialChar(convertedSearch));
return await getSearchResults(formatNoSpecialChar(convertedSearch));
}

return originalResults;
Expand All @@ -60,7 +60,6 @@ export default function SearchModal() {
if (!isOpen) return null;

const isSearching = isLoading || isFetching || isDebouncing;
const showSearchResults = searchInput && !isSearching && data;

return (
<div className='z-30'>
Expand Down Expand Up @@ -102,7 +101,7 @@ export default function SearchModal() {
</p>
</div>
) : (
showSearchResults && <SearchList searchData={data} />
<SearchList searchData={data} />
)}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion FE/src/utils/format.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const formatNoSpecialChar = (query: string) => {
return query.replace(/[^a-zA-Z0-9κ°€-힣 ]|\\/g, '');
return query.replace(/[^a-zA-Z0-9κ°€-νž£γ„±-γ…Žγ…-γ…£ ]|\\/g, '');
};

export function formatTime(time: string) {
Expand Down

0 comments on commit 8106b27

Please sign in to comment.