Small fixes
This commit is contained in:
parent
45bc0bfd2f
commit
20acff066b
@ -17,7 +17,7 @@ async function fetchZipCode({
|
|||||||
latitude,
|
latitude,
|
||||||
}: Coordinate): Promise<ZipCodeReverseResponse> {
|
}: Coordinate): Promise<ZipCodeReverseResponse> {
|
||||||
return fetch(
|
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((request) => request.json())
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
// handles automatically sizing the topbar
|
// handles automatically sizing the topbar
|
||||||
|
|
||||||
export function setTopbarOffset() {
|
export function setTopbarOffset() {
|
||||||
const height = document.getElementById("topbar").getBoundingClientRect().height;
|
const height = document.getElementById("topbar")!.getBoundingClientRect().height;
|
||||||
document.querySelector(":root").style = `--topbar-offset: ${height}px;`
|
document.querySelector(":root")!.style = `--topbar-offset: ${height}px;`
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addToggleDropdownListener() {
|
export function addToggleDropdownListener() {
|
||||||
const element = document.getElementById("dropdown-button");
|
const element = document.getElementById("dropdown-button")!;
|
||||||
const dropdown = document.getElementById("dropdown");
|
const dropdown = document.getElementById("dropdown")!;
|
||||||
console.log("?");
|
|
||||||
element.addEventListener("click", () => {
|
element.addEventListener("click", () => {
|
||||||
dropdown.classList.toggle("enabled");
|
dropdown.classList.toggle("enabled");
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user