fix: compact victory cards, fix date picker overflow, improve city autocomplete
- Merge place/category/competition into single row for compact layout - Inline date range picker (no wrapper div causing overflow) - Remove restrictive Nominatim filter — show all location results - Reduce padding/gaps across all bio fields for denser layout Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -88,24 +88,16 @@ export default function TeamMemberEditorPage() {
|
||||
);
|
||||
const results = await res.json();
|
||||
const cities = results
|
||||
.filter((r: Record<string, unknown>) => {
|
||||
const type = r.type as string;
|
||||
const cls = r.class as string;
|
||||
return cls === "place" || type === "city" || type === "town" || type === "village" || type === "administrative";
|
||||
})
|
||||
.map((r: Record<string, unknown>) => {
|
||||
const addr = r.address as Record<string, string> | undefined;
|
||||
const city = addr?.city || addr?.town || addr?.village || (r.name as string);
|
||||
const city = addr?.city || addr?.town || addr?.village || addr?.state || (r.name as string);
|
||||
const country = addr?.country || "";
|
||||
return country ? `${city}, ${country}` : city;
|
||||
})
|
||||
.filter((v: string, i: number, a: string[]) => a.indexOf(v) === i);
|
||||
.filter((v: string, i: number, a: string[]) => a.indexOf(v) === i)
|
||||
.slice(0, 6);
|
||||
setCitySuggestions(cities.length > 0 ? { index, items: cities } : null);
|
||||
if (cities.length === 0 && query.length >= 3) {
|
||||
setCityErrors((prev) => ({ ...prev, [index]: "Город не найден" }));
|
||||
} else {
|
||||
setCityErrors((prev) => { const n = { ...prev }; delete n[index]; return n; });
|
||||
}
|
||||
setCityErrors((prev) => { const n = { ...prev }; delete n[index]; return n; });
|
||||
} catch {
|
||||
setCitySuggestions(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user