<script setup>
import { useVisitorData } from '@keverdjs/vue';
const { getData, isLoading } = useVisitorData({ immediate: false });
async function onCheckout() {
const result = await getData();
await fetch('/api/checkout', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ eventId: result.event_id }),
});
}
</script>