Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import styles from '../styles/Home.module.css'
import { useEffect } from 'react';
export default function Home() {
useEffect(() => {
return () => {
if (typeof window !== 'undefined') {
(function(t,u,e,m,i,l,io){
t['TuemilioObject']=m;t[m]=t[m]||function(){(t[m].q=t[m].q||[]).push(arguments);};
t[m].id='XXXXXXXXXXXXXXXXXXXXXXXX';l=u.createElement(e),io=u.getElementsByTagName(e)[0];
l.id=m;l.src=i;l.async=1;io.parentNode.insertBefore(l,io);
}(window,document,'script','Tuemilio','https://tuemilio.com/assets/js/modal/4.0/tuemilio-modal.js'));
Tuemilio('init', {
form: {
disabled: true
},
dashboard: {
disabled: true
}
});
Tuemilio('sendVisit');
Tuemilio('onDashboardData', function (dashboard){
console.log(dashboard)
});
}
}
}, []);
function submitForm() {
Tuemilio('createSubscriber', {
address: 'hello@domain.com',
});
}
return (
<div className={styles.container}>
<div>
<button onClick={submitForm}>Send</button>
</div>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment