| 1 |
import { Button } from '@wordpress/components' |
| 2 |
import { General } from '../../api/General' |
| 3 |
|
| 4 |
export default function PromotionNotice({ promotionData }) { |
| 5 |
return ( |
| 6 |
<> |
| 7 |
<span className="text-black">{promotionData?.text ?? ''}</span> |
| 8 |
<span className="px-2 opacity-50" aria-hidden="true"> |
| 9 |
| |
| 10 |
</span> |
| 11 |
<div className="flex items-center justify-center space-x-2"> |
| 12 |
{promotionData?.url && ( |
| 13 |
<Button |
| 14 |
variant="link" |
| 15 |
className="h-auto p-0 text-black underline hover:no-underline" |
| 16 |
href={`${promotionData.url}&utm_source=${window.extendifyData.sdk_partner}`} |
| 17 |
onClick={async () => |
| 18 |
await General.ping('promotion-notice-click') |
| 19 |
} |
| 20 |
target="_blank"> |
| 21 |
{promotionData?.button_text} |
| 22 |
</Button> |
| 23 |
)} |
| 24 |
</div> |
| 25 |
</> |
| 26 |
) |
| 27 |
} |
| 28 |
|