diff --git a/apps/web/src/components/StatePanel.astro b/apps/web/src/components/StatePanel.astro index 84ad9f0..5fab48a 100644 --- a/apps/web/src/components/StatePanel.astro +++ b/apps/web/src/components/StatePanel.astro @@ -1,8 +1,10 @@ --- const { title, description, actionHref, actionLabel, tone = "empty", compact = false, contained = true } = Astro.props as { title: string; description?: string; actionHref?: string; actionLabel?: string; tone?: "empty" | "error" | "unavailable"; compact?: boolean; contained?: boolean }; +const retryHref = actionHref ?? (tone === "unavailable" ? `${Astro.url.pathname}${Astro.url.search}` : undefined); +const retryLabel = actionLabel ?? (tone === "unavailable" ? "Повторить загрузку" : undefined); ---
{description}
} - {actionHref && actionLabel && {actionLabel}} + {retryHref && retryLabel && {retryLabel}}