Spaces:
Paused

dushyantsingh0 commited on
Commit
06e8a0e
·
1 Parent(s): cded7de

fix: KnowledgeBase JSX syntax error and restore suggestions

Browse files
frontend/apps/customer/src/components/KnowledgeBase.module.css CHANGED
@@ -395,13 +395,17 @@
395
 
396
  .categoryNav {
397
  display: flex;
398
- gap: 8px;
399
- padding: 0 40px 8px;
 
 
 
 
 
 
 
400
  overflow-x: auto;
401
  scrollbar-width: none;
402
- -ms-overflow-style: none;
403
- scroll-behavior: smooth;
404
- border-bottom: 1.5px solid var(--border-subtle);
405
  }
406
 
407
  .categoryNav::-webkit-scrollbar {
@@ -409,35 +413,31 @@
409
  }
410
 
411
  .navItem {
412
- padding: 16px 0;
413
  border: none;
414
  background: none;
415
  font-size: 13px;
416
  font-weight: 800;
417
  cursor: pointer;
418
- margin: 0 16px;
419
  white-space: nowrap;
420
  color: var(--text-muted);
421
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
422
  font-family: var(--font-heading);
423
  text-transform: uppercase;
424
  letter-spacing: 0.1em;
425
- border-bottom: 3px solid transparent;
426
  flex-shrink: 0;
427
  }
428
 
429
- .navItem:first-child {
430
- margin-left: 0;
431
- }
432
-
433
  .navItem:hover {
434
  color: var(--text-main);
435
  transform: translateY(-1.5px);
436
  }
437
 
438
  .navItemActive {
439
- color: var(--primary);
440
- border-bottom-color: var(--primary);
 
441
  opacity: 1 !important;
442
  }
443
 
 
395
 
396
  .categoryNav {
397
  display: flex;
398
+ gap: 12px;
399
+ padding: 8px;
400
+ background: var(--bg-card);
401
+ backdrop-filter: blur(20px);
402
+ border: 1.5px solid var(--border-subtle);
403
+ border-radius: 20px;
404
+ width: fit-content;
405
+ margin: 0 auto;
406
+ box-shadow: var(--shadow-lg);
407
  overflow-x: auto;
408
  scrollbar-width: none;
 
 
 
409
  }
410
 
411
  .categoryNav::-webkit-scrollbar {
 
413
  }
414
 
415
  .navItem {
416
+ padding: 10px 24px;
417
  border: none;
418
  background: none;
419
  font-size: 13px;
420
  font-weight: 800;
421
  cursor: pointer;
 
422
  white-space: nowrap;
423
  color: var(--text-muted);
424
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
425
  font-family: var(--font-heading);
426
  text-transform: uppercase;
427
  letter-spacing: 0.1em;
428
+ border-radius: 12px;
429
  flex-shrink: 0;
430
  }
431
 
 
 
 
 
432
  .navItem:hover {
433
  color: var(--text-main);
434
  transform: translateY(-1.5px);
435
  }
436
 
437
  .navItemActive {
438
+ color: #fff !important;
439
+ background: var(--primary);
440
+ box-shadow: 0 8px 20px var(--primary-glow);
441
  opacity: 1 !important;
442
  }
443
 
frontend/apps/customer/src/components/KnowledgeBase.tsx CHANGED
@@ -334,26 +334,27 @@ export const KnowledgeBase: React.FC<KnowledgeBaseProps> = ({ onNewTicket }) =>
334
  </motion.div>
335
  )}
336
  </AnimatePresence>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  </header>
338
 
339
- <div className={styles.navWrapper}>
340
- <nav className={styles.categoryNav} ref={navRef}>
341
- {categories.map(cat => (
342
- <button
343
- key={cat}
344
- disabled={loading}
345
- className={`${styles.navItem} ${selectedCategory === cat ? styles.navItemActive : ''}`}
346
- onClick={() => { setSelectedCategory(cat); fetchArticles(activeQuery, cat); }}
347
- style={{
348
- cursor: loading ? 'not-allowed' : 'pointer',
349
- opacity: loading ? 0.7 : 1
350
- }}
351
- >
352
- {cat}
353
- </button>
354
- ))}
355
- </nav>
356
- </div>
357
 
358
  <div className={styles.resultsContainer}>
359
  <AnimatePresence mode="wait">
 
334
  </motion.div>
335
  )}
336
  </AnimatePresence>
337
+
338
+ <div style={{ marginTop: 48 }}>
339
+ <nav className={styles.categoryNav} ref={navRef}>
340
+ {categories.map(cat => (
341
+ <button
342
+ key={cat}
343
+ disabled={loading}
344
+ className={`${styles.navItem} ${selectedCategory === cat ? styles.navItemActive : ''}`}
345
+ onClick={() => { setSelectedCategory(cat); fetchArticles(activeQuery, cat); }}
346
+ style={{
347
+ cursor: loading ? 'not-allowed' : 'pointer',
348
+ opacity: loading ? 0.7 : 1
349
+ }}
350
+ >
351
+ {cat}
352
+ </button>
353
+ ))}
354
+ </nav>
355
+ </div>
356
  </header>
357
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
 
359
  <div className={styles.resultsContainer}>
360
  <AnimatePresence mode="wait">