fix: unify coordinate precision labels
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import type { Activity } from "../lib/api";
|
||||
import { activityLevel, ago, kg, spotPath } from "../lib/api";
|
||||
import { activityLevel, ago, coordinatePrecisionLabel, kg, spotPath } from "../lib/api";
|
||||
import FishingIcon from "./FishingIcon.astro";
|
||||
import DataPassport from "./DataPassport.astro";
|
||||
import FishSilhouette from "./FishSilhouette.astro";
|
||||
@@ -8,7 +8,7 @@ import TackleGlyph from "./TackleGlyph.astro";
|
||||
const { item, periodLabel = null } = Astro.props as { item: Activity; periodLabel?: string | null };
|
||||
const level = activityLevel(item.activity_score);
|
||||
const limited = item.catches < 3;
|
||||
const precision = { exact: "точные", approximate: "приблизительные", area: "район", missing: "не указаны" }[item.coordinate_precision];
|
||||
const precision = coordinatePrecisionLabel(item.coordinate_precision);
|
||||
---
|
||||
<a class="spot-card" data-testid={`spot-${item.x}-${item.y}`} href={spotPath(item)}>
|
||||
<span class="spot-rank">{String(item.activity_score).padStart(2,"0")}</span>
|
||||
|
||||
Reference in New Issue
Block a user