Small fixes
This commit is contained in:
		
							parent
							
								
									45bc0bfd2f
								
							
						
					
					
						commit
						20acff066b
					
				| @ -17,7 +17,7 @@ async function fetchZipCode({ | ||||
|     latitude, | ||||
| }: Coordinate): Promise<ZipCodeReverseResponse> { | ||||
|     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) => { | ||||
|  | ||||
| @ -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"); | ||||
|     }); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user