| 1 |
import { useAIConsentStore } from '@shared/state/ai-consent'; |
| 2 |
import { Panel } from '@wordpress/components'; |
| 3 |
import { __ } from '@wordpress/i18n'; |
| 4 |
|
| 5 |
export const ConsentSidebar = () => { |
| 6 |
const { consentTerms, setUserGaveConsent } = useAIConsentStore(); |
| 7 |
|
| 8 |
return ( |
| 9 |
<Panel> |
| 10 |
<div className="p-4"> |
| 11 |
<h2 className="mb-2 mt-0 text-lg"> |
| 12 |
{__('Terms of Use', 'extendify-local')} |
| 13 |
</h2> |
| 14 |
<p className="m-0" dangerouslySetInnerHTML={{ __html: consentTerms }} /> |
| 15 |
<button |
| 16 |
className="mt-4 w-full rounded-sm border-0 bg-wp-theme-main px-4 py-2 text-center text-white" |
| 17 |
type="button" |
| 18 |
onClick={() => setUserGaveConsent(true)} |
| 19 |
data-test="draft-terms-button" |
| 20 |
> |
| 21 |
{__('Accept', 'extendify-local')} |
| 22 |
</button> |
| 23 |
</div> |
| 24 |
</Panel> |
| 25 |
); |
| 26 |
}; |
| 27 |
|