PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.17
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.17
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 1.3.51 1.3.50 1.3.49 All 181 releases
disco / backend / views / components / Main / pages / Rules / Tabs / DesignBlock / CountDownTime / CountdownTime.jsx

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

50 lines 1.6 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 { updateCountdown } 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 CountdownTimeCard from './components/CountdownTimeCard';
11
12 const CountdownTime = () => {
13 const dispatch = useDispatch();
14 const { countdown } = useSelector((state) => state.discount.design_blocks);
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(updateCountdown({ name: 'enable', value: status }));
22 };
23
24 return (
25 <BadgeComponentContainer>
26 <CountdownTimeCard />
27 <BadgeTitle
28 title={__('Countdown Time', 'disco')}
29 url="https://discoplugin.com/docs/display-countdown-timer/"
30 className="disco:mt-3"
31 />
32 <BadgeActions>
33 <Status
34 status={countdown?.enable || false}
35 handleStatus={handleStatus}
36 disabled={!isPro}
37 dataTestid="countdown-time-status"
38 />
39 <ProFeatureButton
40 tryNowUrl={tryNowUrl}
41 componentToEdit="CountdownTimeEdit"
42 testId="countdown-time"
43 />
44 </BadgeActions>
45 </BadgeComponentContainer>
46 );
47 };
48
49 export default CountdownTime;
50