+
+ setAddress(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ void geocode();
+ }
+ }}
+ placeholder="Adresse oder Ort"
+ aria-label="Adresse"
+ disabled={busy}
+ />
+
+
+
+ {busy ? (
+
{t("aktion.laden")}
+ ) : null}
+ {message ?
{message}
: null}
+
+ );
+}
diff --git a/src/lib/geo/__tests__/candidates.test.ts b/src/lib/geo/__tests__/candidates.test.ts
new file mode 100644
index 0000000..70faefd
--- /dev/null
+++ b/src/lib/geo/__tests__/candidates.test.ts
@@ -0,0 +1,58 @@
+import { describe, it, expect } from "vitest";
+import { filterAndCapCandidates } from "../candidates";
+import type { Coordinates } from "../types";
+
+const origin: Coordinates = { lat: 48.2079, lng: 15.6229 };
+
+type Hit = { brigadeId: string; label: string };
+
+describe("filterAndCapCandidates (reine Vorfilter-Logik)", () => {
+ const coordsById = (m: Record