2026-04-15 18:35:05 +02:00
|
|
|
/**
|
|
|
|
|
* This file is part of the SplendidBear Websites' projects.
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2026 @ www.splendidbear.org
|
|
|
|
|
*
|
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { createRoot } from 'react-dom/client';
|
2026-04-21 11:30:07 +02:00
|
|
|
import { ContactForm } from '@global-components';
|
2026-04-15 18:35:05 +02:00
|
|
|
|
|
|
|
|
const wrapper = document.getElementById('contact-form-wrapper');
|
|
|
|
|
|
|
|
|
|
if (wrapper) {
|
|
|
|
|
const siteKey = wrapper.dataset.siteKey;
|
|
|
|
|
const recaptchaFieldId = wrapper.dataset.recaptchaFieldId;
|
|
|
|
|
|
|
|
|
|
if (siteKey && recaptchaFieldId) {
|
|
|
|
|
createRoot(wrapper).render(
|
|
|
|
|
<ContactForm
|
|
|
|
|
siteKey={siteKey}
|
|
|
|
|
recaptchaFieldId={recaptchaFieldId}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
console.error('ContactForm: Missing siteKey or recaptchaFieldId in data attributes');
|
|
|
|
|
}
|
|
|
|
|
}
|