```
✨ feat(revervation): create basetwig for réservation
```
This commit is contained in:
41
assets/reserve.js
Normal file
41
assets/reserve.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import './reserve.scss';
|
||||
import * as Sentry from "@sentry/browser";
|
||||
|
||||
// --- INITIALISATION SENTRY ---
|
||||
Sentry.init({
|
||||
dsn: "https://803814be6540031b1c37bf92ba9c0f79@sentry.esy-web.dev/24",
|
||||
tunnel: "/sentry-tunnel",
|
||||
sendDefaultPii: true,
|
||||
integrations: [
|
||||
Sentry.browserTracingIntegration(),
|
||||
Sentry.replayIntegration()
|
||||
],
|
||||
tracesSampleRate: 1.0,
|
||||
tracePropagationTargets: ["localhost", "esy-web.dev", "revervation.ludikevent.fr"],
|
||||
replaysSessionSampleRate: 0.1,
|
||||
replaysOnErrorSampleRate: 1.0
|
||||
});
|
||||
|
||||
// --- LOGIQUE DU MENU MOBILE ---
|
||||
const initMobileMenu = () => {
|
||||
const btn = document.getElementById('menu-button');
|
||||
const menu = document.getElementById('mobile-menu');
|
||||
|
||||
|
||||
if (btn && menu) {
|
||||
btn.onclick = () => {
|
||||
const isExpanded = btn.getAttribute('aria-expanded') === 'true';
|
||||
btn.setAttribute('aria-expanded', !isExpanded);
|
||||
menu.classList.toggle('hidden');
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
// --- INITIALISATION ---
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
initMobileMenu();
|
||||
});
|
||||
|
||||
document.addEventListener('turbo:load', () => {
|
||||
initMobileMenu();
|
||||
});
|
||||
Reference in New Issue
Block a user