|
|
@@ -28,7 +28,7 @@ export default function SearchPop({
|
|
|
open,
|
|
|
onClose,
|
|
|
}: SearchPopProps) {
|
|
|
- const { data, error, searchProducts } = useSearchProduct();
|
|
|
+ const { data, error, searchProducts,loading } = useSearchProduct();
|
|
|
|
|
|
const [keyword, setKeyword] = useState("");
|
|
|
const [placeholderIndex, setPlaceholderIndex] = useState(0);
|
|
|
@@ -384,7 +384,9 @@ export default function SearchPop({
|
|
|
</Grid>
|
|
|
) :
|
|
|
null} */}
|
|
|
- <p className="text-center font-medium text-base leading-[24px] mb-9">Sorry, we couldn't find any results</p>
|
|
|
+ {(hasKeyword && !loading && products.length === 0)&&(
|
|
|
+ <p className="text-center font-medium text-base leading-[24px] mb-9">Sorry, we couldn't find any results</p>
|
|
|
+ )}
|
|
|
<Recommend
|
|
|
paddingClassName="py-0"
|
|
|
titleClassName="text-base font-semibold"
|