@nyris/nyris-webapp 0.3.89 → 0.3.90
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/build/_headers +2 -0
- package/build/asset-manifest.json +6 -6
- package/build/index.html +1 -1
- package/build/js/settings.example.js +17 -0
- package/build/static/css/main.734b52e1.css +4 -0
- package/build/static/css/main.734b52e1.css.map +1 -0
- package/build/static/js/main.cede3ae1.js +3 -0
- package/build/static/js/{main.ca8b95bc.js.map → main.cede3ae1.js.map} +1 -1
- package/package.json +3 -3
- package/public/_headers +2 -0
- package/public/index.html +1 -1
- package/public/js/settings.example.js +17 -0
- package/src/App.tsx +5 -3
- package/src/components/Cart.tsx +321 -0
- package/src/components/CustomCameraDrawer.tsx +4 -22
- package/src/components/DragDropFile.tsx +57 -38
- package/src/components/ExperienceVisualSearch/ExperienceVisualSearch.tsx +6 -1
- package/src/components/ExperienceVisualSearch/ExperienceVisualSearchTrigger.tsx +2 -2
- package/src/components/GroundingSpecs.tsx +47 -0
- package/src/components/Header.tsx +94 -93
- package/src/components/HitsPerPage.tsx +4 -2
- package/src/components/ImagePreview.tsx +64 -31
- package/src/components/ImageUpload.tsx +247 -0
- package/src/components/ItemSpecification.tsx +164 -0
- package/src/components/MatchNotificationBanner.tsx +165 -0
- package/src/components/PostFilter/PostFilter.tsx +22 -1
- package/src/components/PostFilter/PostFilterComponent.tsx +59 -26
- package/src/components/PostFilter/PostFilterFindApi.tsx +242 -0
- package/src/components/PoweredBy.tsx +16 -0
- package/src/components/PreFilter/PreFilter.tsx +77 -54
- package/src/components/Product/Product.tsx +186 -28
- package/src/components/Product/ProductAttribute.tsx +2 -2
- package/src/components/Product/ProductDetailView.tsx +123 -18
- package/src/components/Product/ProductDetailViewModal.tsx +3 -0
- package/src/components/Product/ProductList.tsx +78 -8
- package/src/components/SidePanel.tsx +212 -120
- package/src/components/TextSearch.tsx +82 -203
- package/src/components/Toaster.tsx +34 -15
- package/src/helpers/ToastHelper.ts +6 -2
- package/src/hooks/useCadSearch.ts +5 -0
- package/src/hooks/useImageSearch.ts +102 -13
- package/src/index.css +59 -0
- package/src/layouts/AppLayout.tsx +16 -14
- package/src/pages/Home.tsx +61 -13
- package/src/pages/Result.tsx +287 -295
- package/src/services/vizo.ts +161 -0
- package/src/stores/request/Misc/misc.initialstate.ts +1 -0
- package/src/stores/request/Misc/misc.slice.ts +1 -0
- package/src/stores/request/filter/filter.initialState.ts +3 -0
- package/src/stores/request/filter/filter.slice.ts +23 -0
- package/src/stores/result/prodcuts/products.initialState.ts +4 -0
- package/src/stores/result/prodcuts/products.slice.ts +15 -0
- package/src/stores/types.ts +27 -1
- package/src/stores/ui/loading/loading.initialState.ts +1 -0
- package/src/stores/ui/loading/loading.slice.ts +4 -0
- package/src/stores/ui/sidePanel/sidePanel.initialState.ts +5 -0
- package/src/stores/ui/sidePanel/sidePanel.slice.ts +11 -0
- package/src/stores/ui/uiStore.ts +4 -1
- package/src/styles/Cart.scss +210 -0
- package/src/styles/common.scss +10 -0
- package/src/translations.ts +4 -4
- package/src/types.ts +11 -3
- package/src/utils/prepareImageList.ts +6 -5
- package/src/utils/textSearchFilter.ts +203 -0
- package/tailwind.config.js +1 -0
- package/build/static/css/main.ba1c7479.css +0 -4
- package/build/static/css/main.ba1c7479.css.map +0 -1
- package/build/static/js/main.ca8b95bc.js +0 -3
- package/src/components/Footer.tsx +0 -21
- /package/build/static/js/{main.ca8b95bc.js.LICENSE.txt → main.cede3ae1.js.LICENSE.txt} +0 -0
package/src/pages/Result.tsx
CHANGED
|
@@ -19,13 +19,15 @@ import TextSearch from 'components/TextSearch';
|
|
|
19
19
|
import { Icon } from '@nyris/nyris-react-components';
|
|
20
20
|
import PostFilterDrawer from 'components/PostFilter/PostFilterDrawer';
|
|
21
21
|
import ImagePreview from 'components/ImagePreview';
|
|
22
|
-
import
|
|
22
|
+
import PoweredBy from 'components/PoweredBy';
|
|
23
23
|
import CurrentRefinements from 'components/CurrentRefinements';
|
|
24
24
|
import { GoBackButton } from 'components/GoBackButton';
|
|
25
25
|
import { useCurrentRefinements } from 'react-instantsearch';
|
|
26
26
|
import CustomCamera from 'components/CustomCameraDrawer';
|
|
27
27
|
import { useTranslation } from 'react-i18next';
|
|
28
28
|
import { useImageSearch } from 'hooks/useImageSearch';
|
|
29
|
+
import ItemSpecification from 'components/ItemSpecification';
|
|
30
|
+
import MatchNotificationBanner from 'components/MatchNotificationBanner';
|
|
29
31
|
|
|
30
32
|
function Results() {
|
|
31
33
|
const settings = window.settings;
|
|
@@ -114,6 +116,7 @@ function Results() {
|
|
|
114
116
|
image: file,
|
|
115
117
|
settings: window.settings,
|
|
116
118
|
showFeedback: true,
|
|
119
|
+
clearPostFilter: true,
|
|
117
120
|
}).then(() => {});
|
|
118
121
|
});
|
|
119
122
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -189,350 +192,339 @@ function Results() {
|
|
|
189
192
|
'justify-between',
|
|
190
193
|
'relative',
|
|
191
194
|
'h-full',
|
|
192
|
-
'overflow-y-auto',
|
|
193
195
|
])}
|
|
194
196
|
>
|
|
195
197
|
<SidePanel className="hidden desktop:flex" />
|
|
196
198
|
|
|
197
|
-
<div className="
|
|
198
|
-
{requestImages[0] && <ImagePreview />}
|
|
199
|
-
{window.settings.showImageDetails && (imageAnalysis?.imageDescription ||
|
|
200
|
-
Object.keys(imageAnalysis?.specification || {}).length > 0) && (
|
|
201
|
-
<div className="p-2">
|
|
202
|
-
<div className="self-stretch p-4 bg-[#f3f3f5] rounded flex justify-start flex-col items-start gap-2 flex-wrap content-start w-full">
|
|
203
|
-
{imageAnalysis?.imageDescription !==
|
|
204
|
-
'No description available' && (
|
|
205
|
-
<div className="self-stretch flex flex-col justify-start items-start">
|
|
206
|
-
<div className="justify-start text-black text-base font-semibold">
|
|
207
|
-
Image description
|
|
208
|
-
</div>
|
|
209
|
-
<div className="self-stretch justify-start text-black text-sm font-normal">
|
|
210
|
-
{imageAnalysis?.imageDescription || ''}
|
|
211
|
-
</div>
|
|
212
|
-
</div>
|
|
213
|
-
)}
|
|
214
|
-
|
|
215
|
-
<div className="justify-start text-[#2b2c46] text-base font-semibold mt-1">
|
|
216
|
-
Identified Attributes
|
|
217
|
-
</div>
|
|
218
|
-
<div className="flex justify-start items-start gap-4 flex-wrap content-start">
|
|
219
|
-
{Object.keys(imageAnalysis?.specification || {})
|
|
220
|
-
.filter((key) => (key !== 'is_nameplate' && key !== 'prefilter_value'))
|
|
221
|
-
.map(
|
|
222
|
-
key => {
|
|
223
|
-
const value = imageAnalysis?.specification[key];
|
|
224
|
-
if (!value) {
|
|
225
|
-
return null;
|
|
226
|
-
}
|
|
227
|
-
return (
|
|
228
|
-
<>
|
|
229
|
-
<div
|
|
230
|
-
className="inline-flex flex-col justify-center items-start "
|
|
231
|
-
key={key}
|
|
232
|
-
>
|
|
233
|
-
<div className="pl-1 inline-flex justify-center items-center gap-2.5">
|
|
234
|
-
<div className="justify-start text-[#2b2c46] text-sm font-semibold">
|
|
235
|
-
{key}
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
<div
|
|
239
|
-
className={twMerge(
|
|
240
|
-
`p-3 bg-[#e4e3ff] rounded-lg inline-flex justify-center items-center gap-1.5`,
|
|
241
|
-
'text-[#3e36dc]',
|
|
242
|
-
specificationFilter[key]
|
|
243
|
-
? 'border-[#3E36DC] bg-[#3E36DC] text-white'
|
|
244
|
-
: '',
|
|
245
|
-
)}
|
|
246
|
-
onClick={() => {
|
|
247
|
-
if (!value) {
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
const setSpecificationFilter =
|
|
251
|
-
useRequestStore.getState()
|
|
252
|
-
.setSpecificationFilter;
|
|
253
|
-
|
|
254
|
-
const setSpecificationFilteredProducts =
|
|
255
|
-
useResultStore.getState()
|
|
256
|
-
.setSpecificationFilteredProducts;
|
|
257
|
-
|
|
258
|
-
if (specificationFilter[key]) {
|
|
259
|
-
setSpecificationFilter({});
|
|
260
|
-
setSpecificationFilteredProducts([]);
|
|
261
|
-
// setProducts(results);
|
|
262
|
-
} else {
|
|
263
|
-
setSpecificationFilter({
|
|
264
|
-
[key]: value,
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
}}
|
|
268
|
-
>
|
|
269
|
-
<div className="justify-start text-sm font-medium leading-none flex gap-2">
|
|
270
|
-
{imageAnalysis?.specification[key] || 'N/A'}
|
|
271
|
-
<div>
|
|
272
|
-
<Icon
|
|
273
|
-
name="close"
|
|
274
|
-
className={twMerge(
|
|
275
|
-
'w-3 h-3 text-white',
|
|
276
|
-
specificationFilter[key]
|
|
277
|
-
? 'block'
|
|
278
|
-
: 'hidden',
|
|
279
|
-
)}
|
|
280
|
-
/>
|
|
281
|
-
</div>
|
|
282
|
-
</div>
|
|
283
|
-
</div>
|
|
284
|
-
</div>
|
|
285
|
-
</>
|
|
286
|
-
);
|
|
287
|
-
},
|
|
288
|
-
)}
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
291
|
-
</div>
|
|
292
|
-
)}
|
|
293
|
-
</div>
|
|
294
|
-
<div
|
|
295
|
-
className={twMerge([
|
|
296
|
-
requestImages[0] ? 'pt-0' : 'pt-3',
|
|
297
|
-
'desktop:pt-10',
|
|
298
|
-
'desktop:overflow-hidden',
|
|
299
|
-
'desktop:overflow-y-auto',
|
|
300
|
-
'flex',
|
|
301
|
-
'flex-col',
|
|
302
|
-
'relative',
|
|
303
|
-
'w-full',
|
|
304
|
-
'mr-auto',
|
|
305
|
-
'ml-auto',
|
|
306
|
-
'h-full',
|
|
307
|
-
])}
|
|
308
|
-
>
|
|
199
|
+
<div className="w-full h-full flex flex-col">
|
|
309
200
|
<div
|
|
310
201
|
className={twMerge([
|
|
202
|
+
requestImages[0] ? 'pt-0' : 'pt-3',
|
|
203
|
+
'desktop:pt-0',
|
|
204
|
+
'desktop:mt-0',
|
|
311
205
|
'flex',
|
|
312
206
|
'flex-col',
|
|
313
|
-
'
|
|
314
|
-
'
|
|
207
|
+
'relative',
|
|
208
|
+
'w-full',
|
|
209
|
+
'mr-auto',
|
|
210
|
+
'ml-auto',
|
|
211
|
+
'max-h-full',
|
|
212
|
+
'flex-1',
|
|
213
|
+
'overflow-y-auto',
|
|
315
214
|
])}
|
|
316
215
|
>
|
|
317
|
-
<div
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
216
|
+
<div className="block desktop:hidden desktop:mb-0">
|
|
217
|
+
{requestImages[0] && <ImagePreview />}
|
|
218
|
+
{window.settings.showImageDetails &&
|
|
219
|
+
(imageAnalysis?.imageDescription ||
|
|
220
|
+
Object.keys(imageAnalysis?.specification || {}).length >
|
|
221
|
+
0) && (
|
|
222
|
+
<div className="p-2">
|
|
223
|
+
<div className="self-stretch p-4 bg-[#f3f3f5] rounded flex justify-start flex-col items-start gap-2 flex-wrap content-start w-full">
|
|
224
|
+
{imageAnalysis?.imageDescription !==
|
|
225
|
+
'No description available' && (
|
|
226
|
+
<div className="self-stretch flex flex-col justify-start items-start">
|
|
227
|
+
<div className="justify-start text-black text-base font-semibold">
|
|
228
|
+
Image description
|
|
229
|
+
</div>
|
|
230
|
+
<div className="self-stretch justify-start text-black text-sm font-normal">
|
|
231
|
+
{imageAnalysis?.imageDescription || ''}
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
)}
|
|
235
|
+
|
|
236
|
+
{Object.keys(imageAnalysis?.specification || {})
|
|
237
|
+
.filter(
|
|
238
|
+
key =>
|
|
239
|
+
key !== 'is_nameplate' &&
|
|
240
|
+
key !== 'prefilter_value',
|
|
241
|
+
)
|
|
242
|
+
.some(key => !!imageAnalysis?.specification[key]) && (
|
|
243
|
+
<div className="justify-start text-[#2b2c46] text-base font-semibold mt-1">
|
|
244
|
+
Identified Attributes
|
|
245
|
+
</div>
|
|
246
|
+
)}
|
|
247
|
+
<div className="flex justify-start items-start gap-4 flex-wrap content-start">
|
|
248
|
+
{Object.keys(imageAnalysis?.specification || {})
|
|
249
|
+
.filter(
|
|
250
|
+
key =>
|
|
251
|
+
key !== 'is_nameplate' &&
|
|
252
|
+
key !== 'prefilter_value',
|
|
253
|
+
)
|
|
254
|
+
.map(key => {
|
|
255
|
+
const value = imageAnalysis?.specification[key];
|
|
256
|
+
if (!value) {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
return (
|
|
260
|
+
<ItemSpecification
|
|
261
|
+
attr={key}
|
|
262
|
+
value={value}
|
|
263
|
+
specificationFilter={specificationFilter}
|
|
264
|
+
imageAnalysis={imageAnalysis}
|
|
265
|
+
/>
|
|
266
|
+
);
|
|
267
|
+
})}
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
)}
|
|
332
272
|
</div>
|
|
333
273
|
<div
|
|
334
274
|
className={twMerge([
|
|
335
|
-
'
|
|
336
|
-
'
|
|
275
|
+
requestImages[0] ? 'pt-0' : 'pt-3',
|
|
276
|
+
'desktop:pt-4',
|
|
277
|
+
'desktop:overflow-hidden',
|
|
278
|
+
'desktop:overflow-y-auto',
|
|
337
279
|
'flex',
|
|
338
|
-
'
|
|
339
|
-
'
|
|
340
|
-
'
|
|
341
|
-
'
|
|
280
|
+
'flex-col',
|
|
281
|
+
'relative',
|
|
282
|
+
'w-full',
|
|
283
|
+
'mr-auto',
|
|
284
|
+
'ml-auto',
|
|
285
|
+
'h-full',
|
|
342
286
|
])}
|
|
343
287
|
>
|
|
344
|
-
<div
|
|
288
|
+
<div
|
|
289
|
+
className={twMerge([
|
|
290
|
+
'flex',
|
|
291
|
+
'flex-col',
|
|
292
|
+
'flex-grow',
|
|
293
|
+
'desktop:mt-0',
|
|
294
|
+
])}
|
|
295
|
+
>
|
|
345
296
|
<div
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
297
|
+
style={{
|
|
298
|
+
fontWeight: 700,
|
|
299
|
+
fontSize: 16,
|
|
300
|
+
marginLeft: 16,
|
|
301
|
+
marginBottom: 16,
|
|
302
|
+
}}
|
|
351
303
|
>
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
304
|
+
{!specifications?.specificationPrefilter &&
|
|
305
|
+
specifications?.prefilter_value &&
|
|
306
|
+
window.settings.algolia.enabled &&
|
|
307
|
+
t('Showing results for machine', {
|
|
308
|
+
prefilter_title:
|
|
309
|
+
window.settings.preFilterTitle?.toLocaleLowerCase(),
|
|
310
|
+
prefilter_value: specifications.prefilter_value,
|
|
311
|
+
})}
|
|
355
312
|
</div>
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
313
|
+
<div
|
|
314
|
+
className={twMerge([
|
|
315
|
+
'h-full',
|
|
316
|
+
'relative',
|
|
317
|
+
'flex',
|
|
318
|
+
'justify-center',
|
|
319
|
+
'mx-0.5',
|
|
320
|
+
'mobile-md:mx-2',
|
|
321
|
+
'desktop:mx-4',
|
|
322
|
+
])}
|
|
323
|
+
>
|
|
324
|
+
<div className="max-w-[840px] w-full relative flex flex-col justify-between mb-20 desktop:mb-0">
|
|
325
|
+
<div
|
|
326
|
+
className={twMerge(
|
|
327
|
+
'grid grid-cols-[repeat(auto-fit,_minmax(180px,_0px))] desktop:grid-cols-[repeat(auto-fit,_minmax(190px,_0px))]',
|
|
328
|
+
'gap-2 desktop:gap-6 justify-center max-w-[100%] mx-auto',
|
|
329
|
+
'w-full',
|
|
330
|
+
)}
|
|
331
|
+
>
|
|
332
|
+
<GoBackButton className="col-span-full mb-2 desktop:mb-0" />
|
|
333
|
+
<CurrentRefinements className="col-span-full" />
|
|
334
|
+
<MatchNotificationBanner className="col-span-full" />
|
|
335
|
+
<ProductList />
|
|
363
336
|
</div>
|
|
364
|
-
</div>
|
|
365
|
-
)}
|
|
366
337
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
<Feedback
|
|
375
|
-
submitFeedback={submitFeedback}
|
|
376
|
-
onFeedbackClose={() => {
|
|
377
|
-
setFeedbackStatus('submitted');
|
|
378
|
-
setShowFeedback(false);
|
|
379
|
-
}}
|
|
380
|
-
/>
|
|
338
|
+
{showFeedbackSuccess && (
|
|
339
|
+
<div className={'feedback-floating'}>
|
|
340
|
+
<div className="feedback-section">
|
|
341
|
+
<div className="feedback-success">
|
|
342
|
+
{t('Thank you for your feedback')}
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
381
345
|
</div>
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
!isAlgoliaLoading &&
|
|
401
|
-
!isFindApiLoading &&
|
|
402
|
-
window.settings.rfq &&
|
|
403
|
-
window.settings.rfq.enabled && (
|
|
404
|
-
<RfqBanner
|
|
405
|
-
requestImage={requestImages[0]}
|
|
406
|
-
selectedRegion={regions[0]}
|
|
407
|
-
/>
|
|
346
|
+
)}
|
|
347
|
+
|
|
348
|
+
{feedbackStatus === 'visible' &&
|
|
349
|
+
!showFeedbackSuccess &&
|
|
350
|
+
productsFromAlgolia.length > 0 && (
|
|
351
|
+
<div className={'feedback-floating'}>
|
|
352
|
+
<div className="feedback-section feedback-backdrop-blur" />
|
|
353
|
+
|
|
354
|
+
<div className="feedback-section">
|
|
355
|
+
<Feedback
|
|
356
|
+
submitFeedback={submitFeedback}
|
|
357
|
+
onFeedbackClose={() => {
|
|
358
|
+
setFeedbackStatus('submitted');
|
|
359
|
+
setShowFeedback(false);
|
|
360
|
+
}}
|
|
361
|
+
/>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
408
364
|
)}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
365
|
+
<div>
|
|
366
|
+
<Pagination
|
|
367
|
+
isLoading={isFindApiLoading || isAlgoliaLoading}
|
|
368
|
+
className={
|
|
369
|
+
productsFromAlgolia.length === 0 &&
|
|
370
|
+
!isAlgoliaLoading
|
|
371
|
+
? 'opacity-0'
|
|
372
|
+
: ''
|
|
373
|
+
}
|
|
374
|
+
/>
|
|
375
|
+
<div
|
|
376
|
+
style={{
|
|
377
|
+
display: 'flex',
|
|
378
|
+
flexGrow: 1,
|
|
379
|
+
}}
|
|
380
|
+
>
|
|
381
|
+
{requestImages.length > 0 &&
|
|
382
|
+
!isAlgoliaLoading &&
|
|
383
|
+
!isFindApiLoading &&
|
|
384
|
+
window.settings.rfq &&
|
|
385
|
+
window.settings.rfq.enabled && (
|
|
386
|
+
<RfqBanner
|
|
387
|
+
requestImage={requestImages[0]}
|
|
388
|
+
selectedRegion={regions[0]}
|
|
389
|
+
/>
|
|
390
|
+
)}
|
|
391
|
+
{!isFindApiLoading &&
|
|
392
|
+
window.settings.support &&
|
|
393
|
+
window.settings.support.enabled &&
|
|
394
|
+
(query || requestImages[0] || specifications) && (
|
|
395
|
+
<InquiryBanner
|
|
396
|
+
requestImage={requestImages[0]}
|
|
397
|
+
selectedRegion={regions[0]}
|
|
398
|
+
query={query}
|
|
399
|
+
/>
|
|
400
|
+
)}
|
|
401
|
+
</div>
|
|
402
|
+
{settings.showPoweredByNyris && (
|
|
403
|
+
<PoweredBy
|
|
404
|
+
className={
|
|
405
|
+
'flex desktop:w-0 desktop:h-0 w-full justify-center items-center mb-2'
|
|
406
|
+
}
|
|
417
407
|
/>
|
|
418
408
|
)}
|
|
409
|
+
</div>
|
|
419
410
|
</div>
|
|
420
|
-
<Footer className="bg-[#fafafa] desktop:hidden" />
|
|
421
411
|
</div>
|
|
422
412
|
</div>
|
|
423
413
|
</div>
|
|
414
|
+
<div className="mt-[6px]">
|
|
415
|
+
<HitsPerPage
|
|
416
|
+
items={[
|
|
417
|
+
{ label: '10', value: 10 },
|
|
418
|
+
{ label: '20', value: 20, default: true },
|
|
419
|
+
{ label: '30', value: 30 },
|
|
420
|
+
{ label: '40', value: 40 },
|
|
421
|
+
{ label: '50', value: 50 },
|
|
422
|
+
]}
|
|
423
|
+
/>
|
|
424
|
+
</div>
|
|
424
425
|
</div>
|
|
425
|
-
|
|
426
|
-
<HitsPerPage
|
|
427
|
-
items={[
|
|
428
|
-
{ label: '10', value: 10 },
|
|
429
|
-
{ label: '20', value: 20, default: true },
|
|
430
|
-
{ label: '30', value: 30 },
|
|
431
|
-
{ label: '40', value: 40 },
|
|
432
|
-
{ label: '50', value: 50 },
|
|
433
|
-
]}
|
|
434
|
-
/>
|
|
435
426
|
</div>
|
|
436
427
|
</div>
|
|
437
|
-
</div>
|
|
438
428
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
style={{
|
|
447
|
-
position: 'relative',
|
|
448
|
-
width: '48px',
|
|
449
|
-
height: '48px',
|
|
450
|
-
padding: ' 8px',
|
|
451
|
-
flexShrink: 0,
|
|
452
|
-
borderRadius: '32px',
|
|
453
|
-
background: '#FAFAFA',
|
|
454
|
-
boxShadow: ' 0px 0px 8px 0px rgba(0, 0, 0, 0.15)',
|
|
455
|
-
}}
|
|
456
|
-
onClick={() => {
|
|
457
|
-
if (disablePostFilter && !isPostFilterApplied) return;
|
|
458
|
-
setShowPostFilter(true);
|
|
459
|
-
|
|
460
|
-
// setPreFilterDropdown(false);
|
|
461
|
-
}}
|
|
462
|
-
>
|
|
429
|
+
<div className="flex desktop:hidden w-full fixed bottom-4 z-50 px-3 pr-5 gap-2">
|
|
430
|
+
<TextSearch
|
|
431
|
+
className="flex desktop:hidden w-full gap-2"
|
|
432
|
+
onCameraClick={() => setOpenModalCamera(true)}
|
|
433
|
+
/>
|
|
434
|
+
{/* <ImageUpload onCameraClick={() => setOpenModalCamera(true)} /> */}
|
|
435
|
+
{isShowFilter && settings.postFilterOption && (
|
|
463
436
|
<div
|
|
464
437
|
style={{
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
borderRadius: '40px',
|
|
474
|
-
width: '32px',
|
|
475
|
-
height: '32px',
|
|
476
|
-
justifyContent: 'center',
|
|
477
|
-
alignItems: 'center',
|
|
438
|
+
position: 'relative',
|
|
439
|
+
width: '48px',
|
|
440
|
+
height: '48px',
|
|
441
|
+
padding: ' 8px',
|
|
442
|
+
flexShrink: 0,
|
|
443
|
+
borderRadius: '32px',
|
|
444
|
+
background: '#FAFAFA',
|
|
445
|
+
boxShadow: ' 0px 0px 8px 0px rgba(0, 0, 0, 0.15)',
|
|
478
446
|
}}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
className={twMerge([
|
|
483
|
-
isPostFilterApplied
|
|
484
|
-
? 'text-[#3E36DC]'
|
|
485
|
-
: disablePostFilter
|
|
486
|
-
? 'text-[#E0E0E0]'
|
|
487
|
-
: 'text-[#2B2C46]',
|
|
488
|
-
])}
|
|
489
|
-
/>
|
|
490
|
-
</div>
|
|
447
|
+
onClick={() => {
|
|
448
|
+
if (disablePostFilter && !isPostFilterApplied) return;
|
|
449
|
+
setShowPostFilter(true);
|
|
491
450
|
|
|
492
|
-
|
|
451
|
+
// setPreFilterDropdown(false);
|
|
452
|
+
}}
|
|
453
|
+
>
|
|
493
454
|
<div
|
|
494
455
|
style={{
|
|
495
|
-
position: 'absolute',
|
|
496
|
-
top: '8px',
|
|
497
|
-
left: '35px',
|
|
498
456
|
display: 'flex',
|
|
457
|
+
background: `${
|
|
458
|
+
disablePostFilter
|
|
459
|
+
? '#F3F3F5'
|
|
460
|
+
: isPostFilterApplied
|
|
461
|
+
? '#F0EFFF'
|
|
462
|
+
: '#F3F3F5'
|
|
463
|
+
}`,
|
|
464
|
+
borderRadius: '40px',
|
|
465
|
+
width: '32px',
|
|
466
|
+
height: '32px',
|
|
499
467
|
justifyContent: 'center',
|
|
500
468
|
alignItems: 'center',
|
|
501
|
-
background: 'white',
|
|
502
|
-
width: '10px',
|
|
503
|
-
height: '10px',
|
|
504
|
-
borderRadius: '100%',
|
|
505
469
|
}}
|
|
506
470
|
>
|
|
507
|
-
<
|
|
508
|
-
|
|
509
|
-
width: '8px',
|
|
510
|
-
height: '8px',
|
|
511
|
-
borderRadius: '100%',
|
|
512
|
-
}}
|
|
471
|
+
<Icon
|
|
472
|
+
name="filter"
|
|
513
473
|
className={twMerge([
|
|
514
474
|
isPostFilterApplied
|
|
515
|
-
? '
|
|
475
|
+
? 'text-[#3E36DC]'
|
|
516
476
|
: disablePostFilter
|
|
517
|
-
|
|
518
|
-
|
|
477
|
+
? 'text-[#E0E0E0]'
|
|
478
|
+
: 'text-[#2B2C46]',
|
|
519
479
|
])}
|
|
520
|
-
|
|
480
|
+
/>
|
|
521
481
|
</div>
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
482
|
+
|
|
483
|
+
{isPostFilterApplied && (
|
|
484
|
+
<div
|
|
485
|
+
style={{
|
|
486
|
+
position: 'absolute',
|
|
487
|
+
top: '8px',
|
|
488
|
+
left: '35px',
|
|
489
|
+
display: 'flex',
|
|
490
|
+
justifyContent: 'center',
|
|
491
|
+
alignItems: 'center',
|
|
492
|
+
background: 'white',
|
|
493
|
+
width: '10px',
|
|
494
|
+
height: '10px',
|
|
495
|
+
borderRadius: '100%',
|
|
496
|
+
}}
|
|
497
|
+
>
|
|
498
|
+
<div
|
|
499
|
+
style={{
|
|
500
|
+
width: '8px',
|
|
501
|
+
height: '8px',
|
|
502
|
+
borderRadius: '100%',
|
|
503
|
+
}}
|
|
504
|
+
className={twMerge([
|
|
505
|
+
isPostFilterApplied
|
|
506
|
+
? 'bg-[#3E36DC]'
|
|
507
|
+
: disablePostFilter
|
|
508
|
+
? 'bg-[#E0E0E0]'
|
|
509
|
+
: 'bg-[#2B2C46]',
|
|
510
|
+
])}
|
|
511
|
+
></div>
|
|
512
|
+
</div>
|
|
513
|
+
)}
|
|
514
|
+
</div>
|
|
515
|
+
)}
|
|
516
|
+
</div>
|
|
517
|
+
<PostFilterDrawer
|
|
518
|
+
openModal={showPostFilter}
|
|
519
|
+
handleClose={() => setShowPostFilter(false)}
|
|
520
|
+
/>
|
|
521
|
+
<CustomCamera
|
|
522
|
+
show={isOpenModalCamera}
|
|
523
|
+
onClose={() => {
|
|
524
|
+
setOpenModalCamera(s => !s);
|
|
525
|
+
}}
|
|
526
|
+
/>
|
|
525
527
|
</div>
|
|
526
|
-
<PostFilterDrawer
|
|
527
|
-
openModal={showPostFilter}
|
|
528
|
-
handleClose={() => setShowPostFilter(false)}
|
|
529
|
-
/>
|
|
530
|
-
<CustomCamera
|
|
531
|
-
show={isOpenModalCamera}
|
|
532
|
-
onClose={() => {
|
|
533
|
-
setOpenModalCamera(s => !s);
|
|
534
|
-
}}
|
|
535
|
-
/>
|
|
536
528
|
</>
|
|
537
529
|
);
|
|
538
530
|
}
|