| 1 |
import React from 'react'; |
| 2 |
import { useBlockProps } from '@wordpress/block-editor'; |
| 3 |
import { RawHTML } from '@wordpress/element'; |
| 4 |
import { IFormBlockAttributes } from './registerFormBlock'; |
| 5 |
|
| 6 |
export default function FormSaveBlock({ attributes }: IFormBlockAttributes) { |
| 7 |
const { portalId, formId } = attributes; |
| 8 |
|
| 9 |
if (portalId && formId) { |
| 10 |
return ( |
| 11 |
<RawHTML {...useBlockProps.save()}> |
| 12 |
{`[hubspot portal="${portalId}" id="${formId}" type="form"]`} |
| 13 |
</RawHTML> |
| 14 |
); |
| 15 |
} |
| 16 |
return null; |
| 17 |
} |
| 18 |
|