tabexseriescomponents 0.0.65 → 0.0.67

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.
Files changed (184) hide show
  1. package/dist/index.cjs.js +22892 -14865
  2. package/dist/index.esm.js +22897 -14871
  3. package/dist/index.umd.js +21722 -13696
  4. package/package.json +1 -1
  5. package/{srcOLD → src1-10}/Contexts/LanguageContext.jsx +0 -0
  6. package/{srcOLD → src1-10}/Contexts/ProductsCardsSectionContext.jsx +0 -0
  7. package/{srcOLD → src1-10}/StylesJS/Customstyles.js +0 -0
  8. package/{srcOLD → src1-10}/TabexComponents/Cards/CategoryCardwithhoveraction/CategoryCardwithhoveraction.jsx +0 -9
  9. package/{srcOLD → src1-10}/TabexComponents/Cards/Categorycard_fullimage/Categorycard_fullimage.jsx +0 -19
  10. package/{srcOLD → src1-10}/TabexComponents/Cards/Categorycard_slidebgscaled/Categorycard_slidebgscaled.jsx +0 -8
  11. package/{srcOLD → src1-10}/TabexComponents/Cards/Categorycard_with_trianglebg/Categorycard_with_trianglebg.jsx +0 -7
  12. package/{srcOLD → src1-10}/TabexComponents/Cards/Categorycard_with_twolinestransition/Categorycard_with_twolinestransition.jsx +45 -72
  13. package/{srcOLD → src1-10}/TabexComponents/Cards/Categorycard_withshapes/Categorycard_withshapes.jsx +0 -0
  14. package/{srcOLD → src1-10}/TabexComponents/Cards/Categorycard_withtext/Categorycard_withtext.jsx +0 -9
  15. package/{srcOLD → src1-10}/TabexComponents/Cards/Classiccategorycard/Classiccategorycard.jsx +0 -9
  16. package/{srcOLD → src1-10}/TabexComponents/Cards/Horizontalcard/Horizontalcard.jsx +0 -15
  17. package/{srcOLD → src1-10}/TabexComponents/Cards/MenuCard/MenuCard.jsx +0 -12
  18. package/{srcOLD → src1-10}/TabexComponents/Cards/ModernProductCard/ModernProductCard.jsx +0 -12
  19. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard6/Productcard6.jsx +0 -10
  20. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard7/Productcard7.jsx +0 -10
  21. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard_animatedbuttons/Productcard_animatedbuttons.jsx +0 -14
  22. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard_with_circularbg/Productcard_with_circularbg.jsx +0 -17
  23. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard_with_circularhover/Productcard_with_circularhover.jsx +1 -14
  24. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard_with_slideanimation/Productcard_with_slideanimation.jsx +0 -11
  25. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard_with_variants/Productcard_with_variants.jsx +0 -10
  26. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcard_with_zoominonhover/Productcard_with_zoominonhover.jsx +0 -10
  27. package/{srcOLD → src1-10}/TabexComponents/Cards/Productcarddefault/Productcarddefault.jsx +0 -10
  28. package/{srcOLD → src1-10}/TabexComponents/Cards/Productccard_with_imageontopleft/Productccard_with_imageontopleft.jsx +0 -12
  29. package/{srcOLD → src1-10}/TabexComponents/Cards/Prouductcard_with_zoomhover/Prouductcard_with_zoomhover.jsx +0 -12
  30. package/{srcOLD → src1-10}/TabexComponents/Cards/Simplecategorycardwithtextbelow/Simplecategorycardwithtextbelow.jsx +0 -9
  31. package/{srcOLD → src1-10}/TabexComponents/Cards/Simpleproductcard/Simpleproductcard.jsx +3 -15
  32. package/{srcOLD → src1-10}/TabexComponents/Cards/StylishProductCard/StylishProductCard.jsx +1 -11
  33. package/{srcOLD → src1-10}/TabexComponents/Footer/Footer1/Footer1.jsx +26 -26
  34. package/{srcOLD → src1-10}/TabexComponents/Footer/Footer2/Footer2.jsx +24 -25
  35. package/{srcOLD → src1-10}/TabexComponents/Footer/Footer3/Footer3.jsx +14 -6
  36. package/{srcOLD → src1-10}/TabexComponents/Footer/Footer4/Footer4.jsx +11 -12
  37. package/{srcOLD → src1-10}/TabexComponents/Footer/Footer5/Footer5.jsx +81 -88
  38. package/{srcOLD → src1-10}/TabexComponents/Footer/Footer6/Footer6.jsx +39 -48
  39. package/{srcOLD → src1-10}/TabexComponents/Footer/Footer7/Footer7.jsx +58 -61
  40. package/{srcOLD → src1-10}/TabexComponents/Footer/Simplefooter/Simplefooter.jsx +27 -34
  41. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/egyptflag.png +0 -0
  42. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/noimage.png +0 -0
  43. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/payment/cod.png +0 -0
  44. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/payment/fawry.png +0 -0
  45. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/payment/payment.png +0 -0
  46. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/payment/paymob.png +0 -0
  47. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/payment/paypal.png +0 -0
  48. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/payment/visa.png +0 -0
  49. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/shoppingcart.png +0 -0
  50. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/tabexlogo.png +0 -0
  51. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/unknownmaleuser.png +0 -0
  52. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/usflag.png +0 -0
  53. package/{srcOLD → src1-10}/TabexComponents/Generalfiles/images/whatsapp.png +0 -0
  54. package/{srcOLD → src1-10}/TabexComponents/Headers/AllinoneHeader/AllinoneHeader.jsx +97 -99
  55. package/{srcOLD → src1-10}/TabexComponents/Headers/ClassicHeader/ClassicHeader.jsx +74 -80
  56. package/{srcOLD → src1-10}/TabexComponents/Headers/Header4/Header4.jsx +77 -95
  57. package/{srcOLD → src1-10}/TabexComponents/Headers/Header6/Header6.jsx +73 -76
  58. package/src1-10/TabexComponents/Headers/Header8/Header8.jsx +888 -0
  59. package/{srcOLD → src1-10}/TabexComponents/Headers/HeaderRestaurant/HeaderRestaurant.jsx +93 -137
  60. package/{srcOLD → src1-10}/TabexComponents/Headers/Header_threesectionslogocentered/Header_threesectionslogocentered.jsx +85 -114
  61. package/{srcOLD → src1-10}/TabexComponents/Headers/Headerresponsive/Headerresponsive.jsx +3 -23
  62. package/{srcOLD → src1-10}/TabexComponents/Headers/HeaderwithContactinfo/HeaderwithContactinfo.jsx +116 -114
  63. package/{srcOLD → src1-10}/TabexComponents/Headers/Modernheader/Modernheader.jsx +100 -92
  64. package/{srcOLD → src1-10}/TabexComponents/Headers/StylishHeader/StylishHeader.jsx +110 -98
  65. package/{srcOLD → src1-10}/TabexComponents/Headers/Subheader/Subheader.jsx +10 -22
  66. package/{srcOLD → src1-10}/TabexComponents/Sections/BackgroundImages/Backgroundimage1/Backgroundimage1.jsx +0 -0
  67. package/{srcOLD → src1-10}/TabexComponents/Sections/BackgroundImages/Backgroundimage_with_toppill/Backgroundimage_with_toppill.jsx +0 -0
  68. package/{srcOLD → src1-10}/TabexComponents/Sections/BackgroundImages/BackgroundimageandTextsection/BackgroundimageandTextsection.jsx +0 -9
  69. package/{srcOLD → src1-10}/TabexComponents/Sections/BackgroundImages/Section_with_rightbgcont/Section_with_rightbgcont.jsx +0 -7
  70. package/{srcOLD → src1-10}/TabexComponents/Sections/BackgroundImages/Threebgimages/Threebgimages.jsx +0 -0
  71. package/src1-10/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +409 -0
  72. package/{srcOLD → src1-10}/TabexComponents/Sections/Cards/CardsSection/CardsSection.jsx +7 -75
  73. package/{srcOLD/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.js → src1-10/TabexComponents/Sections/Cards/CardsSection2/CardsSection2.jsx} +82 -92
  74. package/{srcOLD → src1-10}/TabexComponents/Sections/Cards/CardsSection7/CardsSection7.js +0 -0
  75. package/{srcOLD → src1-10}/TabexComponents/Sections/Cards/CardsSection8/CardsSection8.js +0 -0
  76. package/{srcOLD/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.js → src1-10/TabexComponents/Sections/Cards/Sixverticalcardssection/Sixverticalcardssection.jsx} +34 -74
  77. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/AboutSection/AboutSection.jsx +0 -0
  78. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Backgroundimage_with_topcircle/Backgroundimage_with_topcircle.jsx +0 -0
  79. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Freetextsection/Freetextsection.jsx +0 -0
  80. package/src1-10/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +139 -0
  81. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Image_with_rightwords/Image_with_rightwords.jsx +0 -0
  82. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Servicesection/Servicesection.jsx +0 -0
  83. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/ServicesectionCenteredcards/ServicesectionCenteredcards.jsx +0 -0
  84. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Slideshow_with_rotatedsquare/Slideshow_with_rotatedsquare.jsx +0 -0
  85. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Slideshow_with_squarebg/Slideshow_with_squarebg.jsx +0 -0
  86. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Slideshowdifferentanimations/Slideshowdifferentanimations.jsx +0 -0
  87. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Slideshowfade/Slideshowfade.jsx +0 -8
  88. package/src1-10/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +197 -0
  89. package/src1-10/TabexComponents/Sections/Slideshow/Slideshowzoom/Arrow.js +91 -0
  90. package/{srcOLD → src1-10}/TabexComponents/Sections/Slideshow/Slideshowzoom/Slideshowzoom.jsx +92 -53
  91. package/{srcOLD → src1-10}/TabexComponents/StaticPages/AccountInformation/AccountInformation.jsx +0 -15
  92. package/{srcOLD → src1-10}/TabexComponents/StaticPages/CartSlider/CartSlider.jsx +0 -0
  93. package/{srcOLD/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.js → src1-10/TabexComponents/StaticPages/Categoriesdropdown/Categoriesdropdown.jsx} +110 -40
  94. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Checkout/Checkout.jsx +0 -0
  95. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Filter/Filter.jsx +0 -0
  96. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Login/FacebookLoginButton.jsx +0 -0
  97. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Login/GoogleLoginButton.jsx +0 -0
  98. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Login/Login.jsx +0 -0
  99. package/{srcOLD → src1-10}/TabexComponents/StaticPages/OrderSuccess/OrderSuccess.js +0 -0
  100. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Ordershistory/Ordershistory.jsx +0 -14
  101. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Policies/Policies.jsx +0 -5
  102. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Productinfo/Productinfo.jsx +0 -50
  103. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Searchlist/Searchlist.jsx +0 -16
  104. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Signup/CustomerInformationForm.jsx +0 -12
  105. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Signup/Signup.jsx +0 -0
  106. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Staticpagesrouter/Staticpagesrouter.jsx +0 -10
  107. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Viewcart/Viewcart.js +0 -0
  108. package/{srcOLD → src1-10}/TabexComponents/StaticPages/Wishlist/Wishlist.jsx +0 -23
  109. package/{srcOLD → src1-10}/assets/images/cod.png +0 -0
  110. package/{srcOLD → src1-10}/assets/images/egyptflag.png +0 -0
  111. package/{srcOLD → src1-10}/assets/images/fawry.png +0 -0
  112. package/{srcOLD → src1-10}/assets/images/payment.png +0 -0
  113. package/{srcOLD → src1-10}/assets/images/paymob.png +0 -0
  114. package/{srcOLD → src1-10}/assets/images/paypal.png +0 -0
  115. package/{srcOLD → src1-10}/assets/images/shoppingcart.png +0 -0
  116. package/{srcOLD → src1-10}/assets/images/usflag.png +0 -0
  117. package/{srcOLD → src1-10}/assets/images/visa.png +0 -0
  118. package/{srcOLD → src1-10}/assets/images/whatsapp.png +0 -0
  119. package/{srcOLD → src1-10}/button.jsx +0 -0
  120. package/{srcOLD → src1-10}/index.jsx +6 -2
  121. package/{srcOLD → src1-10}/styles/Home.module.css +0 -0
  122. package/{srcOLD → src1-10}/styles/cards/Categorcycard_fullimage.module.css +0 -0
  123. package/{srcOLD → src1-10}/styles/cards/Categorycard_slidebgscaled.module.css +0 -0
  124. package/{srcOLD → src1-10}/styles/cards/Categorycard_withshapes.module.css +0 -0
  125. package/{srcOLD → src1-10}/styles/cards/Productcard6.module.css +0 -0
  126. package/{srcOLD → src1-10}/styles/cards/Productcard_with_circularbg.module.css +0 -0
  127. package/{srcOLD → src1-10}/styles/cards/Productccard_with_zoominonhover.module.css +0 -0
  128. package/{srcOLD → src1-10}/styles/cards/Prouductcard_with_zoomhover.module.css +0 -0
  129. package/{srcOLD → src1-10}/styles/cards/categorycard.module.css +0 -0
  130. package/{srcOLD → src1-10}/styles/cards/categorycard3.module.css +0 -0
  131. package/{srcOLD → src1-10}/styles/cards/categorycardwithtext.module.css +0 -0
  132. package/{srcOLD → src1-10}/styles/cards/productcard_animatedbuttons.module.css +0 -0
  133. package/{srcOLD → src1-10}/styles/cards/productcard_with_textonhover.module.css +0 -0
  134. package/{srcOLD → src1-10}/styles/cards/productccard_with_imageontopleft.module.css +0 -0
  135. package/{srcOLD → src1-10}/styles/general/bootstrap.css +68 -73
  136. package/{srcOLD → src1-10}/styles/general/dropdown.css +0 -0
  137. package/{srcOLD → src1-10}/styles/general/editorbardropdown.module.css +0 -0
  138. package/{srcOLD → src1-10}/styles/general/filter.module.css +0 -0
  139. package/{srcOLD → src1-10}/styles/general/form.module.css +0 -0
  140. package/{srcOLD → src1-10}/styles/general/general.module.css +152 -0
  141. package/{srcOLD → src1-10}/styles/general/image-gallery.css +0 -0
  142. package/{srcOLD → src1-10}/styles/general/react-accessible-accordion.module.css +0 -0
  143. package/{srcOLD → src1-10}/styles/general/react-phone-input-2.module.css +0 -0
  144. package/{srcOLD → src1-10}/styles/general/scrollbtn.module.css +0 -0
  145. package/{srcOLD → src1-10}/styles/general/slick.module.css +0 -0
  146. package/{srcOLD → src1-10}/styles/general/tabs.module.css +0 -0
  147. package/{srcOLD → src1-10}/styles/general/workplaceeditor.module.css +0 -0
  148. package/{srcOLD → src1-10}/styles/globals.css +0 -0
  149. package/{srcOLD → src1-10}/styles/headers/Allinoneheader.module.css +0 -0
  150. package/{srcOLD → src1-10}/styles/headers/Header7.module.css +0 -0
  151. package/{srcOLD → src1-10}/styles/headers/Header_threesectionslogocentered.module.css +0 -0
  152. package/{srcOLD → src1-10}/styles/headers/Sideheader.module.css +0 -0
  153. package/{srcOLD → src1-10}/styles/headers/classicheaderstyles.module.css +0 -0
  154. package/{srcOLD → src1-10}/styles/headers/dropdown.css +0 -0
  155. package/{srcOLD → src1-10}/styles/headers/header4.module.css +0 -0
  156. package/{srcOLD → src1-10}/styles/headers/header5.module.css +0 -0
  157. package/{srcOLD → src1-10}/styles/headers/header6.module.css +0 -0
  158. package/{srcOLD → src1-10}/styles/headers/header_contactinfo.module.css +0 -0
  159. package/{srcOLD → src1-10}/styles/headers/headerresturant.module.css +0 -0
  160. package/{srcOLD → src1-10}/styles/headers/headerstyles.module.css +0 -0
  161. package/{srcOLD → src1-10}/styles/headers/modernheader.module.css +0 -0
  162. package/{srcOLD → src1-10}/styles/headers/subheader.module.css +0 -0
  163. package/{srcOLD → src1-10}/styles/sections/Backgroundimage1.module.css +0 -0
  164. package/{srcOLD → src1-10}/styles/sections/Backgroundimage_with_topcircle.module.css +0 -0
  165. package/{srcOLD → src1-10}/styles/sections/Section_with_rightbgcont.module.css +0 -0
  166. package/{srcOLD → src1-10}/styles/sections/Slideshow_with_rotatedsquare.module.css +0 -0
  167. package/{srcOLD → src1-10}/styles/sections/Slideshow_with_squarebg.module.css +0 -0
  168. package/{srcOLD → src1-10}/styles/staticpages/accordion.module.css +0 -0
  169. package/{srcOLD → src1-10}/styles/staticpages/cart.module.css +0 -0
  170. package/{srcOLD → src1-10}/styles/staticpages/dropdown.css +0 -0
  171. package/{srcOLD → src1-10}/styles/staticpages/filter.module.css +0 -0
  172. package/{srcOLD → src1-10}/styles/staticpages/login.module.css +0 -0
  173. package/{srcOLD → src1-10}/styles/staticpages/productinfo.module.css +0 -0
  174. package/{srcOLD → src1-10}/styles/staticpages/shop.module.css +0 -0
  175. package/{srcOLD → src1-10}/styles/staticpages/signup.module.css +0 -0
  176. package/{srcOLD → src1-10}/styles/staticpages/staticroutersidenav.module.css +0 -0
  177. package/{srcOLD → src1-10}/styles/staticpages/viewcart.module.css +0 -0
  178. package/{srcOLD → src1-10}/styles/staticpages/wishlist.module.css +0 -0
  179. package/srcOLD/TabexComponents/Headers/Header8/Header8.jsx +0 -882
  180. package/srcOLD/TabexComponents/Headers/Subheader/Subheader copy.jsx +0 -228
  181. package/srcOLD/TabexComponents/Sections/BackgroundImages/Twobgimages/Twobgimages.jsx +0 -784
  182. package/srcOLD/TabexComponents/Sections/Slideshow/Image_with_leftwords/Image_with_leftwords.jsx +0 -284
  183. package/srcOLD/TabexComponents/Sections/Slideshow/Slideshowslide/Slideshowslide.jsx +0 -414
  184. package/srcOLD/TabexComponents/StaticPages/Aboutus/Aboutus.js +0 -175
@@ -1,6 +1,5 @@
1
1
  // All take sectionidprops & sectionindexprops
2
2
  import React, { useEffect, useState, useContext } from 'react';
3
-
4
3
  import generalstyles from '../../../../styles/general/general.module.css';
5
4
  import { css } from 'glamor';
6
5
  import Filter from '../../../StaticPages/Filter/Filter.jsx';
@@ -8,8 +7,6 @@ import { useInView } from 'react-intersection-observer';
8
7
  import { MdOutlineLayersClear } from 'react-icons/md';
9
8
  import { BsFillArrowRightCircleFill, BsFillArrowLeftCircleFill } from 'react-icons/bs';
10
9
  import { FiFilter } from 'react-icons/fi';
11
-
12
- import axios from 'axios';
13
10
  import { CircularProgress } from 'react-cssfx-loading';
14
11
  import { ScrollMenu, VisibilityContext } from 'react-horizontal-scrolling-menu';
15
12
  const CardsSection = (props) => {
@@ -49,62 +46,6 @@ const CardsSection = (props) => {
49
46
  const [cardsarray, setcardsarray] = useState([]);
50
47
 
51
48
  const [searchinput, setsearchinput] = useState('');
52
- // const [ParentCollectionsForCollectionQueryArr, setParentCollectionsForCollectionQueryArr] = useState('');
53
- // const fetchcollectionsQueryContext = useQuery(
54
- // ['fetchcollections_API' + JSON.stringify(ParentCollectionsForCollectionQueryArr)],
55
- // () => fetchcollections_API({ parentcollectionid: ParentCollectionsForCollectionQueryArr }),
56
- // {
57
- // keepPreviousData: true,
58
- // staleTime: Infinity,
59
- // enabled: instapikey().length != 0 && ParentCollectionsForCollectionQueryArr.length != 0 ? true : false,
60
- // },
61
- // );
62
- // const FetchProductsAxios = (axiosdatatemp) => {
63
- // var tempProductFilterObjContext = { ...ProductFilterObjContext };
64
- // tempProductFilterObjContext.page = axiosdatatemp;
65
- // if (templatepropcontext.instid == 'tabex') {
66
- // tempProductFilterObjContext.instapikey = 'tabex';
67
- // } else {
68
- // tempProductFilterObjContext.instapikey = instapikey();
69
- // }
70
- // var serverbaselinktemp = window.location.hostname;
71
- // if (serverbaselinktemp == 'localhost') {
72
- // serverbaselinktemp = 'https://tabex-co.com';
73
- // } else {
74
- // serverbaselinktemp = 'https://' + serverbaselinktemp;
75
- // }
76
- // const axiosfetch = axios({
77
- // method: 'post',
78
- // url: serverbaselinktemp + '/customer/webapp/fetchproducts',
79
- // headers: {
80
- // Accept: 'application/json',
81
- // 'Content-Type': 'application/json',
82
- // },
83
- // data: tempProductFilterObjContext,
84
- // });
85
- // return axiosfetch;
86
- // };
87
- // const fetchProductsQuery = useInfiniteQuery(['fetchproducts_API' + JSON.stringify(ProductFilterObjContext)], ({ pageParam = 0 }) => FetchProductsAxios(pageParam), {
88
- // keepPreviousData: true,
89
- // staleTime: Infinity,
90
- // enabled:
91
- // instapikey().length != 0 && fetchingtype == 'products' && ProductFilterObjContext.ProductFetchingType != undefined && ProductFilterObjContext.ProductFetchingType.length != 0
92
- // ? true
93
- // : false,
94
- // initialPageParam: 0,
95
- // getNextPageParam: (lastPage, allPages) => {
96
- // var currentpagefrombackend = lastPage.data.page;
97
-
98
- // if (currentpagefrombackend == 'full') {
99
- // return undefined;
100
- // } else {
101
- // var nextpage = parseInt(currentpagefrombackend) + 1;
102
- // return nextpage;
103
- // }
104
- // },
105
-
106
- // getPreviousPageParam: (firstPage, allPages) => firstPage.data.page - 1,
107
- // });
108
49
  React.useEffect(() => {
109
50
  if (inView) {
110
51
  fetchProductsQuery.fetchNextPage();
@@ -711,7 +652,7 @@ const CardsSection = (props) => {
711
652
  </div>
712
653
  )}
713
654
  {sectionproperties.view_as_slider_vertical != 'Slider (Horizontal)' && (
714
- <div className="row m-0 w-100 ">
655
+ <div className="row m-0 w-100">
715
656
  {cardsarray.map((cardinfoitem, cardinfoindex) => {
716
657
  return (
717
658
  <div
@@ -775,13 +716,6 @@ const CardsSection = (props) => {
775
716
  : ''
776
717
  }
777
718
  >
778
- {/* {React.createElement(sectioncomp, {
779
- sectionidprops: item.sectionid,
780
- sectionindexprops: index,
781
- cardinfoitemprops: cardinfoitem,
782
- cardinfoindexprops: cardinfoindex,
783
- fetchingtypeprops: fetchingtype,
784
- })} */}
785
719
  <Sectioncomp
786
720
  sectiontypeprops={'horizontal'}
787
721
  fetchingtypeprops={fetchingtype}
@@ -789,8 +723,6 @@ const CardsSection = (props) => {
789
723
  cardinfoitemprops={cardinfoitem}
790
724
  sectionindexprops={index}
791
725
  sectionidprops={item.sectionid}
792
- // {...props}
793
- // StatePagePropertiesContext={StatePagePropertiesContext}
794
726
  actions={actions}
795
727
  />
796
728
  </div>
@@ -828,15 +760,15 @@ const CardsSection = (props) => {
828
760
  };
829
761
  return (
830
762
  <div
831
- className={
763
+ class={
832
764
  sectionproperties.card_marginLeft != 0 && sectionproperties.card_marginRight != 0
833
765
  ? // mb-md-4
834
- ' row m-0 d-flex w-100 justify-content-center align-items-center pl-md-2 pr-md-2 '
766
+ ' row m-0 d-flex w-100 justify-content-center pl-md-2 pr-md-2 '
835
767
  : sectionproperties.card_marginRight != 0
836
- ? ' row m-0 d-flex w-100 justify-content-center align-items-center pr-md-2 '
768
+ ? ' row m-0 d-flex w-100 justify-content-center pr-md-2 '
837
769
  : sectionproperties.card_marginLeft != 0
838
- ? ' row m-0 d-flex w-100 justify-content-center align-items-center pl-md-2 '
839
- : ' row m-0 d-flex w-100 justify-content-center align-items-center '
770
+ ? ' row m-0 d-flex w-100 justify-content-center pl-md-2 '
771
+ : ' row m-0 d-flex w-100 justify-content-center '
840
772
  }
841
773
  style={{
842
774
  zIndex: 2,
@@ -845,7 +777,7 @@ const CardsSection = (props) => {
845
777
  }}
846
778
  >
847
779
  {sectionproperties.length != 0 && (
848
- <div className={' row ml-0 mr-0 d-flex align-items-center justify-content-center w-md-100 h-md-100 w-100 '}>
780
+ <div className={' row ml-0 mr-0 d-flex justify-content-center w-md-100 h-md-100 w-100 '}>
849
781
  {sectionproperties.showFilter == 'show' && (
850
782
  <div className={sectionproperties.filterdirection == 'Horizontal' ? ' col-lg-12 ' : 'col-lg-3'}>
851
783
  <Filter sectionpropertiesprops={sectionproperties} actions={actions} />
@@ -1,90 +1,37 @@
1
1
  // All take sectionidprops & sectionindexprops
2
2
  import React, { useEffect, useState, useContext } from 'react';
3
- import { serverbaselink, instapikey } from '../../../../../../../../Env_Variables_Server';
4
- import { WebsiteDesignWorkPlaceContext } from '../../../../../../../../Contexts/WebsiteDesignWorkPlaceContext';
5
- import { TemplateRoutingContext } from '../../../../../../../../Contexts/TemplateRoutingContext';
6
- import { LanguageContext } from '../../../../../../../../Contexts/LanguageContext';
7
- import { FetchingContext } from '../../../../../../../../Contexts/FetchingContext';
8
- import generalstyles from '../../../../../../../../styles/general/general.module.css';
9
-
10
3
  import { css } from 'glamor';
11
- import { ProductsCardsSectionContext } from '../../../../../../../../Contexts/ProductsCardsSectionContext';
12
- import Filter from '../../../StaticPages/Filter/Filter';
13
- import Pagepreloader from '../../../StaticPages/Pagepreloader/Pagepreloader';
14
- import { useQuery, useQueryClient, useMutation, useInfiniteQuery } from 'react-query';
15
4
  import { useInView } from 'react-intersection-observer';
16
- import filterstyles from '../../../../../../../../styles/staticpages/filter.module.css';
17
- import { fetchproducts_API } from '../../../../../../../../components/API/API';
18
5
  import { MdOutlineLayersClear } from 'react-icons/md';
19
- import { BsSearch, BsFillArrowRightCircleFill } from 'react-icons/bs';
20
- import Searchlist from '../../../StaticPages/Searchlist/Searchlist';
21
- import { FiFilter } from 'react-icons/fi';
6
+ import { CircularProgress } from 'react-cssfx-loading';
22
7
  import { ScrollMenu, VisibilityContext } from 'react-horizontal-scrolling-menu';
23
-
24
- // import { LeftArrow, RightArrow, onWheel } from './Arrows.js';
25
- import axios from 'axios';
26
- // import CircularProgress from 'react-cssfx-loading/lib/CircularProgress';
27
-
28
8
  const CardsSection2 = (props) => {
29
9
  const { ref, inView } = useInView();
30
- const { lang, langdetect } = useContext(LanguageContext);
31
- const queryClient = useQueryClient();
32
- const { fetch_inst_tabex_websitetemplatesQueryContext, TabexSectionsComponentsContext, StatePagePropertiesContext } = useContext(WebsiteDesignWorkPlaceContext);
33
- const { fetchcollectionsQueryContext, FetchQueriesEngineContext, setFetchQueriesEngineContext, SearchHeaderMutationContext, favoriteprojectscountContext } = useContext(FetchingContext);
34
- const { ProductFilterObjContext, setProductFilterObjContext } = useContext(ProductsCardsSectionContext);
10
+ const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
11
+ const lang = props.actions.lang;
12
+ const langdetect = props.actions.langdetect;
13
+ const fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
14
+ const favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
15
+ const ProductFilterObjContext = props.actions.ProductFilterObjContext;
16
+ const setProductFilterObjContext = props.actions.setProductFilterObjContext;
17
+ const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
18
+ const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
19
+ const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
20
+ const SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
21
+ const fetchProductsQuery = props.actions.fetchProductsQuery;
22
+ const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
23
+ const setParentCollectionsForCollectionQueryArr = props.actions.setParentCollectionsForCollectionQueryArr;
24
+ const setfetchingtype = props.actions.setfetchingtype;
25
+ const fetchingtype = props.actions.fetchingtype;
26
+ const AddtoCartMutationContext = props.actions.AddtoCartMutationContext;
27
+ const setShowProductInfoModalContext = props.actions.setShowProductInfoModalContext;
28
+ const authdetailsContext = props.actions.authdetailsContext;
29
+ const productfiltercontext = props.actions.productfiltercontext;
30
+ const setproductfiltercontext = props.actions.setproductfiltercontext;
31
+ const actions = props.actions;
35
32
  const [sectionproperties, setsectionproperties] = useState('');
36
33
  const [cardsarray, setcardsarray] = useState([]);
37
- const [fetchingtype, setfetchingtype] = useState('');
38
34
  const [searchinput, setsearchinput] = useState('');
39
- const FetchProductsAxios = (axiosdatatemp) => {
40
- var tempProductFilterObjContext = { ...ProductFilterObjContext };
41
- tempProductFilterObjContext.page = axiosdatatemp;
42
- // setProductFilterObjContext({ ...tempProductFilterObjContext });
43
- if (fetch_inst_tabex_websitetemplatesQueryContext.data.data.template.instid == 'tabex') {
44
- tempProductFilterObjContext.instapikey = 'tabex';
45
- } else {
46
- tempProductFilterObjContext.instapikey = instapikey();
47
- }
48
-
49
- var serverbaselinktemp = window.location.hostname;
50
- if (serverbaselinktemp == 'localhost') {
51
- serverbaselinktemp = 'https://tabex-co.com';
52
- } else {
53
- serverbaselinktemp = 'https://' + serverbaselinktemp;
54
- }
55
-
56
- const axiosfetch = axios({
57
- method: 'post',
58
- url: serverbaselinktemp + '/customer/webapp/fetchproducts',
59
- headers: {
60
- Accept: 'application/json',
61
- 'Content-Type': 'application/json',
62
- },
63
- data: tempProductFilterObjContext,
64
- });
65
- return axiosfetch;
66
- };
67
- const fetchProductsQuery = useInfiniteQuery(['fetchproducts_API' + JSON.stringify(ProductFilterObjContext)], ({ pageParam = 0 }) => FetchProductsAxios(pageParam), {
68
- keepPreviousData: true,
69
- staleTime: Infinity,
70
- enabled:
71
- instapikey().length != 0 && fetchingtype == 'products' && ProductFilterObjContext.ProductFetchingType != undefined && ProductFilterObjContext.ProductFetchingType.length != 0
72
- ? true
73
- : false,
74
- initialPageParam: 0,
75
- getNextPageParam: (lastPage, allPages) => {
76
- var currentpagefrombackend = lastPage.data.page;
77
-
78
- if (currentpagefrombackend == 'full') {
79
- return undefined;
80
- } else {
81
- var nextpage = parseInt(currentpagefrombackend) + 1;
82
- return nextpage;
83
- }
84
- },
85
-
86
- getPreviousPageParam: (firstPage, allPages) => firstPage.data.page - 1,
87
- });
88
35
  React.useEffect(() => {
89
36
  if (inView) {
90
37
  fetchProductsQuery.fetchNextPage();
@@ -154,7 +101,13 @@ const CardsSection2 = (props) => {
154
101
  var tempFetchQueriesEngineContext = FetchQueriesEngineContext;
155
102
 
156
103
  if (fetchingtype == 'collections') {
157
- tempFetchQueriesEngineContext.collections = true;
104
+ // tempFetchQueriesEngineContext.collections = true;
105
+
106
+ if (ProductsFetchingTypeSectionObj.collectionid == 'all' || ProductsFetchingTypeSectionObj.collectionid == null || ProductsFetchingTypeSectionObj.collectionid == undefined) {
107
+ setParentCollectionsForCollectionQueryArr('all');
108
+ } else {
109
+ setParentCollectionsForCollectionQueryArr([ProductsFetchingTypeSectionObj.collectionid]);
110
+ }
158
111
  }
159
112
  if (fetchingtype == 'products') {
160
113
  var tempfetchproductsfilerobjcontext = ProductFilterObjContext;
@@ -169,7 +122,7 @@ const CardsSection2 = (props) => {
169
122
  }, [fetchingtype, ProductsFetchingTypeSectionObj]);
170
123
  useEffect(() => {
171
124
  if (fetchingtype == 'products') {
172
- if (fetchProductsQuery.isSuccess) {
125
+ if (fetchProductsQuery.isSuccess && fetchcustomercartQueryContext.isSuccess) {
173
126
  var allpagesarr = [];
174
127
  fetchProductsQuery.data.pages.forEach((page) => {
175
128
  page.data.products.forEach((productobj) => {
@@ -179,7 +132,7 @@ const CardsSection2 = (props) => {
179
132
  cardobjassigner(allpagesarr);
180
133
  }
181
134
  }
182
- }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data]);
135
+ }, [fetchProductsQuery.isSuccess, fetchProductsQuery.dataUpdatedAt, fetchProductsQuery.data, fetchcustomercartQueryContext.dataUpdatedAt]);
183
136
  useEffect(() => {
184
137
  if (fetchingtype == 'collections') {
185
138
  if (fetchcollectionsQueryContext.isSuccess) {
@@ -218,11 +171,24 @@ const CardsSection2 = (props) => {
218
171
  image: '',
219
172
  };
220
173
  if (fetchingtype == 'products') {
174
+ var itemquantity = 0;
221
175
  if (langdetect == 'en') {
222
176
  cardobj.name = arrayItem.productinfo.name_en;
223
177
  } else {
224
178
  cardobj.name = arrayItem.productinfo.name_ar;
225
179
  }
180
+ if (langdetect == 'en') {
181
+ cardobj.description = arrayItem.productinfo.description_en;
182
+ } else {
183
+ cardobj.description = arrayItem.productinfo.description_ar;
184
+ }
185
+ if (arrayItem.productinfo.hasvariants == 0) {
186
+ fetchcustomercartQueryContext.data.data.customercart.cartitems.forEach(function (cartitem, cartindex) {
187
+ if (cartitem.productid == arrayItem.productinfo.productid) {
188
+ itemquantity = cartitem.quantity;
189
+ }
190
+ });
191
+ }
226
192
  cardobj.image = arrayItem.productinfo.productmainimage;
227
193
  cardobj.hassale = arrayItem.productinfo.hassale;
228
194
  cardobj.productid = arrayItem.productinfo.productid;
@@ -232,7 +198,9 @@ const CardsSection2 = (props) => {
232
198
  cardobj.defaultprice = arrayItem.productinfo.defaultprice;
233
199
  cardobj.defaultsaleprice = arrayItem.productinfo.defaultsaleprice;
234
200
  cardobj.productimages = arrayItem.productinfo.productimages;
201
+ cardobj.quantity = itemquantity;
235
202
  cardobj.timestamp = arrayItem.productinfo.timestamp;
203
+
236
204
  if (favoriteprojectscountContext != undefined && favoriteprojectscountContext.length != 0) {
237
205
  favoriteprojectscountContext.forEach(function (favitem, favindex) {
238
206
  if (arrayItem.productinfo.productid == favitem) {
@@ -244,8 +212,10 @@ const CardsSection2 = (props) => {
244
212
  cardobj.collectionid = arrayItem.collectionid;
245
213
  if (langdetect == 'en') {
246
214
  cardobj.name = arrayItem.title_en;
215
+ cardobj.description = arrayItem.description_en;
247
216
  } else if (langdetect == 'ar') {
248
217
  cardobj.name = arrayItem.title_ar;
218
+ cardobj.description = arrayItem.description_ar;
249
219
  }
250
220
  cardobj.image = arrayItem.collectionlogo;
251
221
  } else if (fetchingtype == 'custom') {
@@ -300,7 +270,6 @@ const CardsSection2 = (props) => {
300
270
  maxWidth: sectionproperties.card_widthhorizontal + 'px',
301
271
  }),
302
272
  };
303
-
304
273
  const cardsrender = () => {
305
274
  return (
306
275
  <div
@@ -385,19 +354,18 @@ const CardsSection2 = (props) => {
385
354
  StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map((item, index) => {
386
355
  if (item.tabexsectioninfo != null) {
387
356
  if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
388
- var sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
357
+ var Sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
389
358
  return (
390
359
  <div className="row m-0 w-100 d-flex justify-content-center">
391
360
  <div className={langdetect == 'en' ? 'col-lg-12 p-0 pl-md-2 pr-md-0' : 'col-lg-12 p-0 pl-md-0 pr-md-2 '}>
392
361
  <ScrollMenu
393
- // onWheel={onWheel}
394
362
  transitionBehavior={'auto'}
395
363
  wrapperClassName={''}
396
364
  itemClassName={
397
365
  item.tabexsectioninfo.sectioncompname == 'Productcard6'
398
366
  ? 'scrollmenuclassnameitemProductcard6'
399
367
  : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularhover'
400
- ? 'scrollmenuclassnameitemProductcardcircularhover'
368
+ ? 'scrollmenuclassnameitemProductcard_with_circularhover'
401
369
  : item.tabexsectioninfo.sectioncompname == 'Productcard_with_circularbg'
402
370
  ? 'scrollmenuclassnameitemProductcard_with_circularbg'
403
371
  : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_twolinestransition'
@@ -413,13 +381,31 @@ const CardsSection2 = (props) => {
413
381
  : item.tabexsectioninfo.sectioncompname == 'Productcarddefault'
414
382
  ? 'scrollmenuclassnameitemProductcarddefault'
415
383
  : item.tabexsectioninfo.sectioncompname == 'Simpleproductcard'
416
- ? section_cssstyles.scrollmenuclassnameitemSimpleproductcard + ' scrollmenuclassnameitemSimpleproductcard '
384
+ ? 'scrollmenuclassnameitemSimpleproductcard'
417
385
  : item.tabexsectioninfo.sectioncompname == 'Categorycard_with_trianglebg'
418
386
  ? 'scrollmenuclassnameitemCategorycard_with_trianglebg'
419
387
  : item.tabexsectioninfo.sectioncompname == 'Productcard_with_textonhover'
420
388
  ? 'scrollmenuclassnameitemProductcard_with_textonhover'
421
389
  : item.tabexsectioninfo.sectioncompname == 'Categorycard_slidebgscaled'
422
390
  ? 'scrollmenuclassnameitemCategorycard_slidebgscaled'
391
+ : item.tabexsectioninfo.sectioncompname == 'Productccard_with_imageontopleft'
392
+ ? 'scrollmenuclassnameitemProductccard_with_imageontopleft'
393
+ : item.tabexsectioninfo.sectioncompname == 'Productcard_with_zoominonhover'
394
+ ? 'scrollmenuclassnameitemProductcard_with_zoominonhover'
395
+ : item.tabexsectioninfo.sectioncompname == 'Horizontalcard'
396
+ ? 'scrollmenuclassnameitemProductcard_Horizontalcard'
397
+ : item.tabexsectioninfo.sectioncompname == 'Categorycard_fullimage'
398
+ ? 'scrollmenuclassnameitemCategorycard_fullimage'
399
+ : item.tabexsectioninfo.sectioncompname == 'Classiccategorycard'
400
+ ? 'scrollmenuclassnameitemClassiccategorycard'
401
+ : item.tabexsectioninfo.sectioncompname == 'ModernProductCard'
402
+ ? 'scrollmenuclassnameitemModernProductCard'
403
+ : item.tabexsectioninfo.sectioncompname == 'Simplecategorycardwithtextbelow'
404
+ ? 'scrollmenuclassnameitemSimplecategorycardwithtextbelow'
405
+ : item.tabexsectioninfo.sectioncompname == 'Productcard7'
406
+ ? 'scrollmenuclassnameitemProductcard7'
407
+ : item.tabexsectioninfo.sectioncompname == 'MenuCard'
408
+ ? 'scrollmenuclassnameitemMenuCard'
423
409
  : 'scrollmenuclassnameitem'
424
410
  }
425
411
  scrollContainerClassName={'scrollmenuclasssubscrollbar'}
@@ -433,20 +419,24 @@ const CardsSection2 = (props) => {
433
419
  paddingLeft: sectionproperties.card_marginLeft + 'px',
434
420
  }}
435
421
  >
436
- {React.createElement(sectioncomp, {
437
- sectionidprops: item.sectionid,
438
- sectionindexprops: index,
439
- cardinfoitemprops: cardinfoitem,
440
- cardinfoindexprops: cardinfoindex,
441
- fetchingtypeprops: fetchingtype,
442
- })}
422
+ <Sectioncomp
423
+ sectiontypeprops={'horizontal'}
424
+ fetchingtypeprops={fetchingtype}
425
+ cardinfoindexprops={cardinfoindex}
426
+ cardinfoitemprops={cardinfoitem}
427
+ sectionindexprops={index}
428
+ sectionidprops={item.sectionid}
429
+ // {...props}
430
+ // StatePagePropertiesContext={StatePagePropertiesContext}
431
+ actions={actions}
432
+ />
443
433
  </div>
444
434
  );
445
435
  })}
446
436
  {fetchingtype == 'products' && (
447
437
  <button
448
438
  className={section_cssstyles.loadbtn + ' d-flex justify-content-end align-items-center '}
449
- ref={ref}
439
+ // ref={ref}
450
440
  onClick={() => fetchProductsQuery.fetchNextPage()}
451
441
  disabled={!fetchProductsQuery.hasNextPage || fetchProductsQuery.isFetchingNextPage}
452
442
  >
@@ -1,81 +1,37 @@
1
1
  import React, { useEffect, useState, useContext } from 'react';
2
- import { instapikey } from '../../../../../../../../Env_Variables_Server';
3
- import { WebsiteDesignWorkPlaceContext } from '../../../../../../../../Contexts/WebsiteDesignWorkPlaceContext';
4
- import { TemplateRoutingContext } from '../../../../../../../../Contexts/TemplateRoutingContext';
5
- import { LanguageContext } from '../../../../../../../../Contexts/LanguageContext';
6
- import { FetchingContext } from '../../../../../../../../Contexts/FetchingContext';
7
2
  import { IKImage } from 'imagekitio-react';
8
-
3
+ import { IKpublicKey, IKurlEndpoint } from '../../../../../Env';
9
4
  import { css } from 'glamor';
10
- import { ProductsCardsSectionContext } from '../../../../../../../../Contexts/ProductsCardsSectionContext';
11
5
  import { useQuery, useQueryClient, useMutation, useInfiniteQuery } from 'react-query';
12
6
  import { useInView } from 'react-intersection-observer';
13
- import { AiFillStar, AiOutlineStar } from 'react-icons/ai';
14
- import { FaRegHeart, FaHeart } from 'react-icons/fa';
15
- import { MdOutlineLayersClear } from 'react-icons/md';
16
7
  import axios from 'axios';
17
8
  import { BsFillArrowRightCircleFill, BsFillArrowLeftCircleFill } from 'react-icons/bs';
18
- import generalstyles from '../../../../../../../../styles/general/general.module.css';
19
- import Horizontalcard from '../../../Cards/Horizontalcard/Horizontalcard';
9
+ import generalstyles from '../../../../styles/general/general.module.css';
20
10
  const Sixverticalcardssection = (props) => {
21
- const { ref, inView } = useInView();
22
- const { lang, langdetect } = useContext(LanguageContext);
23
11
  const queryClient = useQueryClient();
24
- const { TabexSectionsComponentsContext, StatePagePropertiesContext, fetch_inst_tabex_websitetemplatesQueryContext } = useContext(WebsiteDesignWorkPlaceContext);
25
- const { fetchcollectionsQueryContext, FetchQueriesEngineContext, setFetchQueriesEngineContext, SearchHeaderMutationContext, favoriteprojectscountContext, fetchcustomercartQueryContext } =
26
- useContext(FetchingContext);
27
- const { ProductFilterObjContext, setProductFilterObjContext } = useContext(ProductsCardsSectionContext);
28
- const { routingcountext, StaticPagesLinksContext } = useContext(TemplateRoutingContext);
29
12
  const [sectionproperties, setsectionproperties] = useState('');
30
13
  const [cardsarray, setcardsarray] = useState([]);
31
- const [fetchingtype, setfetchingtype] = useState('');
32
14
  const [searchinput, setsearchinput] = useState('');
33
- const FetchProductsAxios = (axiosdatatemp) => {
34
- var tempProductFilterObjContext = { ...ProductFilterObjContext };
35
- tempProductFilterObjContext.page = axiosdatatemp;
36
- if (fetch_inst_tabex_websitetemplatesQueryContext.data.data.template.instid == 'tabex') {
37
- tempProductFilterObjContext.instapikey = 'tabex';
38
- } else {
39
- tempProductFilterObjContext.instapikey = instapikey();
40
- }
41
- var serverbaselinktemp = window.location.hostname;
42
- if (serverbaselinktemp == 'localhost') {
43
- serverbaselinktemp = 'https://tabex-co.com';
44
- } else {
45
- serverbaselinktemp = 'https://' + serverbaselinktemp;
46
- }
47
- const axiosfetch = axios({
48
- method: 'post',
49
- url: serverbaselinktemp + '/customer/webapp/fetchproducts',
50
- headers: {
51
- Accept: 'application/json',
52
- 'Content-Type': 'application/json',
53
- },
54
- data: tempProductFilterObjContext,
55
- });
56
- return axiosfetch;
57
- };
58
- const fetchProductsQuery = useInfiniteQuery(['fetchproducts_API' + JSON.stringify(ProductFilterObjContext)], ({ pageParam = 0 }) => FetchProductsAxios(pageParam), {
59
- keepPreviousData: true,
60
- staleTime: Infinity,
61
- enabled:
62
- instapikey().length != 0 && fetchingtype == 'products' && ProductFilterObjContext.ProductFetchingType != undefined && ProductFilterObjContext.ProductFetchingType.length != 0
63
- ? true
64
- : false,
65
- initialPageParam: 0,
66
- getNextPageParam: (lastPage, allPages) => {
67
- var currentpagefrombackend = lastPage.data.page;
68
-
69
- if (currentpagefrombackend == 'full') {
70
- return undefined;
71
- } else {
72
- var nextpage = parseInt(currentpagefrombackend) + 1;
73
- return nextpage;
74
- }
75
- },
76
-
77
- getPreviousPageParam: (firstPage, allPages) => firstPage.data.page - 1,
78
- });
15
+ const { ref, inView } = useInView();
16
+ const StatePagePropertiesContext = props.actions.StatePagePropertiesContext;
17
+ const lang = props.actions.lang;
18
+ const langdetect = props.actions.langdetect;
19
+ const setlang = props.actions.setlang;
20
+ const fetchcustomercartQueryContext = props.actions.fetchcustomercartQueryContext;
21
+ const favoriteprojectscountContext = props.actions.favoriteprojectscountContext;
22
+ const routingcountext = props.actions.routingcountext;
23
+ const StaticPagesLinksContext = props.actions.StaticPagesLinksContext;
24
+ const ProductFilterObjContext = props.actions.ProductFilterObjContext;
25
+ const setProductFilterObjContext = props.actions.setProductFilterObjContext;
26
+ const TabexSectionsComponentsContext = props.actions.TabexSectionsComponentsContext;
27
+ const FetchQueriesEngineContext = props.actions.FetchQueriesEngineContext;
28
+ const setFetchQueriesEngineContext = props.actions.setFetchQueriesEngineContext;
29
+ const SearchHeaderMutationContext = props.actions.SearchHeaderMutationContext;
30
+ const fetchProductsQuery = props.actions.fetchProductsQuery;
31
+ const fetchcollectionsQueryContext = props.actions.fetchcollectionsQueryContext;
32
+ const setfetchingtype = props.actions.setfetchingtype;
33
+ const fetchingtype = props.actions.fetchingtype;
34
+ const actions = props.actions;
79
35
  React.useEffect(() => {
80
36
  if (inView) {
81
37
  fetchProductsQuery.fetchNextPage();
@@ -367,6 +323,8 @@ const Sixverticalcardssection = (props) => {
367
323
  }}
368
324
  >
369
325
  <IKImage
326
+ urlEndpoint={IKurlEndpoint}
327
+ publicKey={IKpublicKey}
370
328
  className="h-sm-auto"
371
329
  path={bgimagearrayofobjs.length != 0 ? (langdetect == 'en' ? bgimagearrayofobjs[0]?.bgsection_image : bgimagearrayofobjs[0]?.bgsection_image_ar) : ''}
372
330
  style={{
@@ -476,20 +434,22 @@ const Sixverticalcardssection = (props) => {
476
434
  StatePagePropertiesContext.pageobj.sections[props.sectionindexprops].childsections.map((item, index) => {
477
435
  if (item.tabexsectioninfo != null) {
478
436
  if (item.sectionstructype == 'child' && TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname] != undefined) {
479
- var sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
437
+ var Sectioncomp = TabexSectionsComponentsContext[item.tabexsectioninfo.sectioncompname];
480
438
  return (
481
439
  <div className={' row m-0 w-100 d-flex '}>
482
440
  {cardsarray.map((cardinfoitem, cardinfoindex) => {
483
441
  if (cardinfoindex <= 5) {
484
442
  return (
485
443
  <div className={'col-xl-4 col-lg-4 col-md-6 col-sm-12 p-0 '}>
486
- {React.createElement(sectioncomp, {
487
- sectionidprops: item.sectionid,
488
- sectionindexprops: index,
489
- cardinfoitemprops: cardinfoitem,
490
- cardinfoindexprops: cardinfoindex,
491
- fetchingtypeprops: fetchingtype,
492
- })}
444
+ <Sectioncomp
445
+ sectiontypeprops={'horizontal'}
446
+ fetchingtypeprops={fetchingtype}
447
+ cardinfoindexprops={cardinfoindex}
448
+ cardinfoitemprops={cardinfoitem}
449
+ sectionindexprops={index}
450
+ sectionidprops={item.sectionid}
451
+ actions={actions}
452
+ />
493
453
  </div>
494
454
  );
495
455
  }