@riosst100/pwa-marketplace 2.4.0 → 2.4.1

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riosst100/pwa-marketplace",
3
3
  "author": "riosst100@gmail.com",
4
- "version": "2.4.0",
4
+ "version": "2.4.1",
5
5
  "main": "src/index.js",
6
6
  "pwa-studio": {
7
7
  "targets": {
@@ -14,7 +14,7 @@ const FilterTopItem = props => {
14
14
 
15
15
  const handleOnchange = useCallback(
16
16
  e => {
17
- filterApi.clear();
17
+ // filterApi.clear();
18
18
 
19
19
  if (group != "category_uid") {
20
20
  removeGroup({ group });
@@ -226,14 +226,14 @@ export const useFilterSidebar = props => {
226
226
  // on apply, write filter state to location
227
227
  useEffect(() => {
228
228
  if (isApplying) {
229
- const nextSearch = getSearchFromState(
230
- search,
231
- filterKeys,
232
- filterState
233
- );
229
+ // const nextSearch = getSearchFromState(
230
+ // search,
231
+ // filterKeys,
232
+ // filterState
233
+ // );
234
234
 
235
- // write filter state to history
236
- history.push({ pathname, search: nextSearch });
235
+ // // write filter state to history
236
+ // history.push({ pathname, search: nextSearch });
237
237
 
238
238
  // mark the operation as complete
239
239
  setIsApplying(false);
@@ -263,19 +263,9 @@ export const useFilterSidebar = props => {
263
263
  filterApi.removeGroup({ group: subFilter });
264
264
  }
265
265
 
266
- if (group.includes('card_game')) {
267
- if (allActiveFilters && allActiveFilters.size > 0) {
268
- allActiveFilters.forEach((value, key) => {
269
- if (key !== 'card_game') {
270
- filterApi.removeGroup({ group: key });
271
- }
272
- });
273
- }
274
- }
275
-
276
266
  setIsApplying(true);
277
267
  handleClose();
278
- }, [handleClose, filterApi, allActiveFilters]);
268
+ }, [handleClose]);
279
269
 
280
270
  const handleReset = useCallback(() => {
281
271
  filterApi.clear();
@@ -83,9 +83,6 @@ const Breadcrumbs = props => {
83
83
 
84
84
  // const previousSearch = useRef(search);
85
85
 
86
- console.log('search')
87
- console.log(search)
88
-
89
86
  const removeShopbyParam = (url) => {
90
87
  const urlParts = url.split("?"); // Pisahkan URL sebelum dan sesudah tanda tanya
91
88
  if (urlParts.length < 2) return url; // Jika tidak ada query string, kembalikan URL asli
@@ -104,9 +101,6 @@ const Breadcrumbs = props => {
104
101
  }
105
102
 
106
103
  const params = removeShopbyParam(search);
107
-
108
- console.log("paramsparamsparams")
109
- console.log(params)
110
104
 
111
105
  currentFilter && currentFilter.length && currentFilter.map((filter, index) => {
112
106
  currentProduct ? (
@@ -213,6 +213,8 @@ export const useFilterTop = props => {
213
213
  // on apply, write filter state to location
214
214
  useEffect(() => {
215
215
  if (isApplying) {
216
+ console.log('APPLY')
217
+ console.log(search)
216
218
  const nextSearch = getSearchFromState(
217
219
  search,
218
220
  filterKeys,