summaryrefslogtreecommitdiff
path: root/src/lib/brand
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/brand')
-rw-r--r--src/lib/brand/components/Brands.jsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/brand/components/Brands.jsx b/src/lib/brand/components/Brands.jsx
index c94e47c2..f6cb4fbf 100644
--- a/src/lib/brand/components/Brands.jsx
+++ b/src/lib/brand/components/Brands.jsx
@@ -21,14 +21,10 @@ const Brands = () => {
)*/
// Change get brands from solr
- let result = null
- if (name) {
- result = await axios(`${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/brands?params=${name}`)
- } else {
- result = await axios(`${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/brands`)
- }
+ const result = await axios(`${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/brands?params=${name}`)
+
setIsLoading(false)
- setManufactures((manufactures) => [...manufactures, ...result.data])
+ setManufactures((manufactures) => [...result.data])
}, [startWith])
const toggleStartWith = (alphabet) => {