components
4 days ago
faqs
4 days ago
Support.jsx
4 days ago
route.jsx
4 days ago
submit-ticket.js
3 months ago
support.css
4 days ago
utils.js
4 days ago
Support.jsx
73 lines
| 1 | /** |
| 2 | * External Dependencies |
| 3 | */ |
| 4 | import { __ } from '@wordpress/i18n'; |
| 5 | import { BookOpen, File, Folder } from 'lucide-react'; |
| 6 | |
| 7 | /** |
| 8 | * Internal Dependencies |
| 9 | */ |
| 10 | import { siteInfo } from '@advancedAds'; |
| 11 | import { SearchBox } from './components/SearchBox'; |
| 12 | import { CategoryCard } from './components/CategoryCard'; |
| 13 | import { FAQs } from './components/FAQs'; |
| 14 | import { Videos } from './components/Videos'; |
| 15 | import { PaidSupport } from './components/PaidSupport'; |
| 16 | import { SupportForum } from './components/SupportForum'; |
| 17 | |
| 18 | export function Support() { |
| 19 | const endpoint = '/advanced-ads/v1/support-links'; |
| 20 | const { hasAnyValidLicense } = siteInfo; |
| 21 | |
| 22 | return ( |
| 23 | <div className="advads-support-wrap"> |
| 24 | <SearchBox /> |
| 25 | <div className="grid sm:grid-cols-2 xl:grid-cols-4 gap-5 mt-8"> |
| 26 | <CategoryCard |
| 27 | icon={ <BookOpen /> } |
| 28 | endpoint={ endpoint } |
| 29 | title={ __( 'Getting started', 'advanced-ads' ) } |
| 30 | utms="?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_getting_started" |
| 31 | viewAll={ { |
| 32 | label: __( 'View all articles', 'advanced-ads' ), |
| 33 | link: 'https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_getting_started_view_all', |
| 34 | } } |
| 35 | extraArgs={ { |
| 36 | cache_key: 'advads_support_getting_started_links', |
| 37 | } } |
| 38 | /> |
| 39 | <CategoryCard |
| 40 | icon={ <File /> } |
| 41 | endpoint={ endpoint } |
| 42 | title={ __( 'Latest tutorials', 'advanced-ads' ) } |
| 43 | utms="?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_latest_tutorials" |
| 44 | viewAll={ { |
| 45 | label: __( 'View all tutorials', 'advanced-ads' ), |
| 46 | link: 'https://wpadvancedads.com/category/tutorials/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_latest_tutorials_view_all', |
| 47 | } } |
| 48 | extraArgs={ { |
| 49 | cache_key: 'advads_support_latest_tutorials_links', |
| 50 | } } |
| 51 | /> |
| 52 | <CategoryCard |
| 53 | icon={ <Folder /> } |
| 54 | endpoint={ endpoint } |
| 55 | title={ __( 'Articles', 'advanced-ads' ) } |
| 56 | utms="?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_articles" |
| 57 | viewAll={ { |
| 58 | label: __( 'View all articles', 'advanced-ads' ), |
| 59 | link: 'https://wpadvancedads.com/manual/?utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin_support_articles_view_all', |
| 60 | } } |
| 61 | extraArgs={ { |
| 62 | cache_key: 'advads_support_articles_links', |
| 63 | } } |
| 64 | /> |
| 65 | { hasAnyValidLicense ? <PaidSupport /> : <SupportForum /> } |
| 66 | </div> |
| 67 | |
| 68 | <FAQs /> |
| 69 | <Videos /> |
| 70 | </div> |
| 71 | ); |
| 72 | } |
| 73 |