-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
index.js
49 lines (44 loc) · 1.19 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { useUser } from '@woocommerce/data';
/**
* Internal dependencies
*/
import './style.scss';
import RecommendedExtensions from '../components/recommended-extensions';
import KnowledgeBase from '../components/knowledge-base';
import { getAdminSetting } from '~/utils/admin-settings';
import '../data';
const CouponsOverview = () => {
const { currentUserCan } = useUser();
const shouldShowExtensions =
getAdminSetting( 'allowMarketplaceSuggestions', false ) &&
currentUserCan( 'install_plugins' );
return (
<div className="woocommerce-marketing-coupons">
{ !! shouldShowExtensions && (
<RecommendedExtensions
title={ __(
'Recommended coupon extensions',
'woocommerce'
) }
description={ __(
'Take your coupon marketing to the next level with our recommended coupon extensions.',
'woocommerce'
) }
category="coupons"
/>
) }
<KnowledgeBase
category="coupons"
description={ __(
'Learn the ins and outs of successful coupon marketing from the experts at WooCommerce.',
'woocommerce'
) }
/>
</div>
);
};
export default CouponsOverview;