@nyris/nyris-webapp 0.3.79 → 0.3.81

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,11 +1,11 @@
1
1
  {
2
2
  "name": "@nyris/nyris-webapp",
3
- "version": "0.3.79",
3
+ "version": "0.3.81",
4
4
  "dependencies": {
5
5
  "@auth0/auth0-react": "^2.2.4",
6
6
  "@emailjs/browser": "^4.3.3",
7
- "@nyris/nyris-api": "^0.3.79",
8
- "@nyris/nyris-react-components": "^0.3.79",
7
+ "@nyris/nyris-api": "^0.3.81",
8
+ "@nyris/nyris-react-components": "^0.3.81",
9
9
  "@radix-ui/react-accordion": "^1.2.2",
10
10
  "@radix-ui/react-dialog": "^1.1.4",
11
11
  "@radix-ui/react-popover": "^1.1.4",
@@ -1,4 +1,4 @@
1
- import {useEffect, useState} from 'react';
1
+ import { useEffect, useState } from 'react';
2
2
  import {
3
3
  AccordionContent,
4
4
  AccordionItem,
@@ -18,16 +18,11 @@ function PostFilter({
18
18
  searchable: boolean;
19
19
  }) {
20
20
  const [itemsLimit, setItemsLimit] = useState(10);
21
- const [searchInput, setSearchInput] = useState<string>('')
22
- const {
23
- items,
24
- refine,
25
- searchForItems,
26
- } = useRefinementList({
21
+ const [searchInput, setSearchInput] = useState<string>('');
22
+ const { items, refine, searchForItems } = useRefinementList({
27
23
  attribute: attribute,
28
24
  operator: 'or',
29
25
  showMore: false,
30
- sortBy: ['name:asc'],
31
26
  limit: itemsLimit,
32
27
  });
33
28
 
@@ -35,10 +30,11 @@ function PostFilter({
35
30
 
36
31
  useEffect(() => {
37
32
  searchForItems(searchInput);
33
+ // eslint-disable-next-line react-hooks/exhaustive-deps
38
34
  }, [searchInput]);
39
35
 
40
36
  const onShowMore = () => {
41
- setItemsLimit((prev) => prev + 10);
37
+ setItemsLimit(prev => prev + 10);
42
38
  };
43
39
 
44
40
  return (
@@ -49,7 +45,7 @@ function PostFilter({
49
45
  </AccordionTrigger>
50
46
  <div
51
47
  style={{
52
- position: 'relative'
48
+ position: 'relative',
53
49
  }}
54
50
  >
55
51
  <input
@@ -109,7 +105,7 @@ function PostFilter({
109
105
  <button
110
106
  className="hover:bg-[#E9E9EC] rounded-[4px] p-2"
111
107
  style={{
112
- fontSize: 14
108
+ fontSize: 14,
113
109
  }}
114
110
  onClick={onShowMore}
115
111
  >
@@ -6,7 +6,6 @@ import useRequestStore from 'stores/request/requestStore';
6
6
  import useUiStore from 'stores/ui/uiStore';
7
7
  import { useTranslation } from 'react-i18next';
8
8
  import { twMerge } from 'tailwind-merge';
9
- import { useCurrentRefinements } from 'react-instantsearch';
10
9
 
11
10
  interface Props {
12
11
  sendFeedBackAction?: any;
@@ -17,8 +16,6 @@ function ProductList({ sendFeedBackAction }: Props): JSX.Element {
17
16
  const { singleImageSearch } = useImageSearch();
18
17
  const { t } = useTranslation();
19
18
 
20
- const { items } = useCurrentRefinements();
21
-
22
19
  const productsFromAlgolia = useResultStore(
23
20
  state => state.productsFromAlgolia,
24
21
  );