PluginProbe
Extendify / 0.6.0
Extendify v0.6.0
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / components / notices / PromotionNotice.js

PromotionNotice.js in Extendify 0.6.0, at src/components/notices/PromotionNotice.js

33 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { Button } from '@wordpress/components'
2 import { useUserStore } from '@extendify/state/User'
3 import { General } from '../../api/General'
4
5 export default function PromotionNotice({ promotionData }) {
6 return (
7 <>
8 <span className="text-black">{promotionData?.text ?? ''}</span>
9 <span className="px-2 opacity-50" aria-hidden="true">
10 &#124;
11 </span>
12 <div className="flex items-center justify-center space-x-2">
13 {promotionData?.url && (
14 <Button
15 variant="link"
16 className="h-auto p-0 text-black underline hover:no-underline"
17 href={`${promotionData.url}&utm_source=${
18 window.extendifyData.sdk_partner
19 }&utm_group=${useUserStore
20 .getState()
21 .activeTestGroupsUtmValue()}`}
22 onClick={async () =>
23 await General.ping('promotion-notice-click')
24 }
25 target="_blank">
26 {promotionData?.button_text}
27 </Button>
28 )}
29 </div>
30 </>
31 )
32 }
33