Skip to content

Commit 32b469d

Browse files
committed
fix: 상태로도 로딩중 표시
1 parent 5a81f31 commit 32b469d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/src/entities/products/components/SearchBar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const handleSubCategoryClick = async (e: MouseEvent<HTMLButtonElement>) => {
8888
};
8989

9090
export function SearchBar() {
91-
const { categories } = useProductStore();
91+
const { categories, status } = useProductStore();
9292
const { searchQuery, limit = "20", sort, category } = useProductFilter();
9393

9494
const categoryList = Object.keys(categories).length > 0 ? Object.keys(categories) : [];
@@ -185,7 +185,7 @@ export function SearchBar() {
185185
{/* 1depth 카테고리 */}
186186
{!category.category1 && (
187187
<div className="flex flex-wrap gap-2">
188-
{categoryList.length > 0 ? (
188+
{status === "done" && categoryList.length > 0 ? (
189189
categoryButtons
190190
) : (
191191
<div className="text-sm text-gray-500 italic">카테고리 로딩 중...</div>

0 commit comments

Comments
 (0)