PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.21
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.21
1.4.21 1.4.20 1.4.19 1.4.18 1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 All 184 releases
disco / backend / views / components / Docs / components / help-center / HelpCenter.jsx

HelpCenter.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.21, at backend/views/components/Docs/components/help-center/HelpCenter.jsx

69 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { useEffect, useState } from 'react';
2 import initialData from '../../data/docsData';
3 import { getDocsLength } from '../../utils/fetchDocs';
4 import DocCount from './DocCount';
5 import SearchInput from './SearchInput';
6
7 export default function HelpCenter({
8 searchQuery,
9 setSearchQuery,
10 searchResults,
11 }) {
12 const [articlesCount, setArticlesCount] = useState('...');
13
14 useEffect(() => {
15 getDocsLength().then((count) => setArticlesCount(count));
16 }, []);
17
18 const docs = [
19 {
20 label: 'Articles',
21 count: articlesCount,
22 },
23 {
24 label: 'Categories',
25 count: initialData.length,
26 },
27 {
28 label: 'Support',
29 count: '24h',
30 },
31 ];
32
33 return (
34 <div className="disco:bg-primary-light disco:rounded-2xl disco:border disco:border-primary disco:p-7">
35 <div className="disco:flex disco:justify-between">
36 <div>
37 <h4 className="disco:text-sm! disco:text-primary disco:font-bold!">
38 • Help Center
39 </h4>
40 <h2 className="disco:text-3xl! disco:font-extrabold! disco:pb-3">
41 How can we{' '}
42 <span className="disco:text-primary">help</span> you?
43 </h2>
44 <p className="disco:text-sm disco:font-light ">
45 Everything you need to set up, optimize and grow with
46 Disco — <br />
47 guides, tutorials and references.
48 </p>
49 </div>
50 <div className="disco:flex disco:items-start disco:gap-4">
51 {docs.map((doc, index) => (
52 <DocCount
53 key={index}
54 label={doc.label}
55 count={doc.count}
56 />
57 ))}
58 </div>
59 </div>
60 {/* Search */}
61 <SearchInput
62 searchQuery={searchQuery}
63 setSearchQuery={setSearchQuery}
64 searchResults={searchResults}
65 />
66 </div>
67 );
68 }
69