diff --git a/frontend/src/main.ts b/frontend/src/main.ts index 95a2fc6..930a32b 100644 --- a/frontend/src/main.ts +++ b/frontend/src/main.ts @@ -17,7 +17,7 @@ async function fetchZipCode({ latitude, }: Coordinate): Promise { return fetch( - `https://api.dataforsyningen.dk/postnumre/reverse?x=${longitude}&y=${latitude}`, + `https://api.dataforsyningen.dk/postnumre/reverse?x=${longitude}&y=${latitude}&landpostnumre`, ) .then((request) => request.json()) .then((data) => { diff --git a/frontend/src/topbar.ts b/frontend/src/topbar.ts index 90a60f7..f6754af 100644 --- a/frontend/src/topbar.ts +++ b/frontend/src/topbar.ts @@ -1,14 +1,13 @@ // handles automatically sizing the topbar export function setTopbarOffset() { - const height = document.getElementById("topbar").getBoundingClientRect().height; - document.querySelector(":root").style = `--topbar-offset: ${height}px;` + const height = document.getElementById("topbar")!.getBoundingClientRect().height; + document.querySelector(":root")!.style = `--topbar-offset: ${height}px;` } export function addToggleDropdownListener() { - const element = document.getElementById("dropdown-button"); - const dropdown = document.getElementById("dropdown"); - console.log("?"); + const element = document.getElementById("dropdown-button")!; + const dropdown = document.getElementById("dropdown")!; element.addEventListener("click", () => { dropdown.classList.toggle("enabled"); });