14 lines
468 B
JavaScript
14 lines
468 B
JavaScript
import "../../styles/styles.css";
|
|
import { mountBookingPage } from "./booking-page.js";
|
|
|
|
const root = document.querySelector("#booking-root");
|
|
let cleanup;
|
|
function render() {
|
|
cleanup?.();
|
|
// Eigenständige Testseite, bis Person 2 den gemeinsamen Router bereitstellt.
|
|
const match = location.hash.match(/^#\/buchen\/([a-z0-9-]+)$/);
|
|
cleanup = mountBookingPage(root, { packageId: match?.[1] });
|
|
}
|
|
window.addEventListener("hashchange", render);
|
|
render();
|