qazaq-legacy-foundation-web/src/components/BookWhere.tsx
Peppa 768c41c699
All checks were successful
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 3с
peppa/test test: success за 1с
peppa/build build: success за 54с
ci / checks (pull_request) Successful in 1m40s
deploy / deploy (pull_request) Successful in 2m7s
QLFW-44: ссылки на Flip.kz и Marwin в «Где купить книгу»
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 18:35:22 +05:00

29 lines
943 B
TypeScript

import React from 'react'
import type { Dict } from '@/i18n'
import { bookUrl, marwinUrl } from '@/lib/home-model'
const storeUrls: Record<string, string> = { Marwin: marwinUrl, 'Flip.kz': bookUrl }
export function BookWhere({ t }: { t: Dict['book']; tbc?: string }) {
const buy = t.buy
if (!buy) return null
return (
<div className="mt-8">
<h4 className="font-serif text-xl sm:text-2xl">{t.get}</h4>
<p className="mt-3 text-muted">{buy.intro}</p>
<ul className="mt-3 list-disc space-y-1 pl-6 text-muted">
{buy.platforms.map((p) => {
const href = storeUrls[p]
return (
<li key={p}>
{href ? <a href={href} target="_blank" rel="noopener noreferrer" className="underline">{p}</a> : p}
</li>
)
})}
</ul>
<p className="mt-3 text-muted">{buy.stores}</p>
<p className="mt-3 text-muted">{buy.note}</p>
</div>
)
}