--- import SourceBadge from "./SourceBadge.astro"; import { ago, kg, type Catch } from "../lib/api"; import TackleGlyph from "./TackleGlyph.astro"; const { catches } = Astro.props as { catches: Catch[] }; const methodLabels: Record = { spinning: "Спиннинг", bottom: "Донная", float: "Поплавочная" }; const roleLabels: Record = { lure: "Приманка", bait: "Наживка", rig: "Монтаж", rod: "Удилище", reel: "Катушка", line: "Леска", hook: "Крючок", float: "Поплавок", sinker: "Груз" }; ---
{catches.map(item => { const timestamp = item.caught_at ?? item.reported_at; return
{item.fish}{item.bait ?? "Приманка не указана"}{item.fishing_method && Метод: {methodLabels[item.fishing_method] ?? item.fishing_method}}{item.retrieve_method && Проводка: {item.retrieve_method}{item.retrieve_speed != null ? ` · скорость ${item.retrieve_speed}` : ""}}{item.tackle_components?.length > 0 && Комплект: {item.tackle_components.map(component => <>{roleLabels[component.role] ?? component.role}: {component.tackle_item_id ? {component.raw_value} : component.raw_value})}}
{kg(item.weight_g)}{item.player_name ?? "Анонимно"}{item.caught_at ? "Время улова" : "Получено · время улова неизвестно"}
; })}