droplinked-editor-configs 1.9.5 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -7,11 +7,13 @@ import ProductGridLayout from './ProductGridLayout'
|
|
|
7
7
|
import useIsMobile from 'hooks/useIsMobile'
|
|
8
8
|
import useProducts from 'components/productGrid/hooks/useProducts'
|
|
9
9
|
import Text from 'components/ui/Text'
|
|
10
|
+
import { useProductFilters } from 'components/productGrid/hooks/useProductFilters'
|
|
10
11
|
|
|
11
12
|
function ProductGrid({ limit, isEditing }: { limit?: number; isEditing?: boolean }) {
|
|
12
13
|
const { isLoading, data, hasNextPage, fetchNextPage, isFetchingNextPage } = useProducts(limit)
|
|
13
14
|
const products: IHomePageProduct[] = data?.pages.flatMap(page => page?.data?.data || []) || []
|
|
14
15
|
const viewMode = useProductQueryStore(s => s.viewMode)
|
|
16
|
+
const searchTerm = useProductQueryStore(s => s.appliedProductQuery.search)
|
|
15
17
|
const isMobile = useIsMobile()
|
|
16
18
|
|
|
17
19
|
const renderSkeletons = () => {
|
|
@@ -29,7 +31,9 @@ function ProductGrid({ limit, isEditing }: { limit?: number; isEditing?: boolean
|
|
|
29
31
|
if (products.length === 0) return (
|
|
30
32
|
<ProductGridLayout>
|
|
31
33
|
<Text as="p" className="col-span-full text-center">
|
|
32
|
-
|
|
34
|
+
{searchTerm
|
|
35
|
+
? "No products found matching your search"
|
|
36
|
+
: "No products available. Please try again later."}
|
|
33
37
|
</Text>
|
|
34
38
|
</ProductGridLayout>
|
|
35
39
|
)
|