PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.3
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.3
1.4.23 1.4.22 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 All 186 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.3, at backend/views/components/Main/pages/Rules/Tabs/DesignBlock/CartPage/CartPage.jsx

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