diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-23 15:48:06 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-23 15:48:06 +0700 |
| commit | 84d81890283155056c26058df65939f4837b14b4 (patch) | |
| tree | 678519ad645776c619ce1941896dfbab2ac4c4dc /src | |
| parent | 8d2d384509cd21fb76aeec76d82f362995e4851e (diff) | |
CR UI - change label if product not found
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/product/components/ProductSearch.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx index 79df93f4..5fc75930 100644 --- a/src/lib/product/components/ProductSearch.jsx +++ b/src/lib/product/components/ProductSearch.jsx @@ -28,7 +28,7 @@ const ProductSearch = ({ query, prefixUrl, defaultBrand = null, brand = null }) if (defaultBrand) query.brand = defaultBrand.toLowerCase() const { productSearch } = useProductSearch({ query: { ...query, q, limit, orderBy }, - operation: 'AND' + operation: 'AND' }) const [products, setProducts] = useState(null) const [spellings, setSpellings] = useState(null) @@ -148,7 +148,7 @@ const ProductSearch = ({ query, prefixUrl, defaultBrand = null, brand = null }) const SpellingComponent = useMemo(() => { return ( <> - Mungkin yang anda cari{' '} + {spellings?.length > 0 ? <>Mungkin yang anda cari </> : <>Produk yang anda tidak ada</>} {spellings?.map((spelling, i) => ( <Link href={`/shop/search?q=${spelling}`} key={i} className='inline'> {spelling} |
