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 / Main / pages / Rules / Tabs / DesignBlock / CartPage / CartPage.jsx

CartPage.jsx in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.21, at backend/views/components/Main/pages/Rules/Tabs/DesignBlock/CartPage/CartPage.jsx

50 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from '@wordpress/i18n';
2 import { useDispatch, useSelector } from 'react-redux';
3 import { updateCartPage } from '../../../../../features/discount/discountSlice';
4 import useIsPro from '../../../../../hooks/useIsPro';
5 import BadgeActions from '../components/BadgeActions';
6 import BadgeComponentContainer from '../components/BadgeComponentContainer';
7 import BadgeTitle from '../components/BadgeTitle';
8 import ProFeatureButton from '../components/ProFeatureButton';
9 import Status from '../components/Status';
10 import CartCard from './components/CartCard';
11
12 const CartPage = () => {
13 const { cart } = useSelector((state) => state.discount.design_blocks);
14 const dispatch = useDispatch();
15 const isPro = useIsPro();
16
17 const tryNowUrl =
18 'https://discoplugin.com/pricing/?utm_source=bulk-table&utm_medium=free-to-pro&utm_campaign=from-display-page&utm_id=1';
19
20 const handleStatus = (status) => {
21 dispatch(updateCartPage({ name: 'enable', value: status }));
22 };
23
24 return (
25 <BadgeComponentContainer>
26 <CartCard />
27 <BadgeTitle
28 title={__('Cart Notice', 'disco')}
29 url="https://discoplugin.com/docs/display-cart-notice/"
30 className="disco:mt-3"
31 />
32 <BadgeActions>
33 <Status
34 status={cart?.enable || false}
35 handleStatus={handleStatus}
36 disabled={!isPro}
37 dataTestid="cart-notice-status"
38 />
39 <ProFeatureButton
40 tryNowUrl={tryNowUrl}
41 componentToEdit="CartPageEdit"
42 testId="cart-notice"
43 />
44 </BadgeActions>
45 </BadgeComponentContainer>
46 );
47 };
48
49 export default CartPage;
50