diff --git a/next.config.mjs b/next.config.mjs index 7474899..ffd16ba 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -3,6 +3,8 @@ import { withPayload } from '@payloadcms/next/withPayload' /** @type {import('next').NextConfig} */ const nextConfig = { poweredByHeader: false, + // Сборка на слабом раннере упиралась в память (код 137): меньше потоков и экономия памяти webpack. + experimental: { webpackMemoryOptimizations: true, cpus: 1, workerThreads: false }, async redirects() { return [{ source: '/', destination: '/ru', permanent: false }] }, diff --git a/src/components/BookWhere.tsx b/src/components/BookWhere.tsx index 9483850..b96f74a 100644 --- a/src/components/BookWhere.tsx +++ b/src/components/BookWhere.tsx @@ -20,7 +20,7 @@ export function BookWhere({ t }: { t: Dict['book']; tbc?: string }) {

{buy.storesIntro}

{buy.note}

diff --git a/src/components/book-where.test.ts b/src/components/book-where.test.ts index bfe5126..308816d 100644 --- a/src/components/book-where.test.ts +++ b/src/components/book-where.test.ts @@ -16,16 +16,17 @@ describe('Сценарий: где купить книгу', () => { expect(html).toContain('можно приобрести онлайн на платформах:') expect(html).toContain('href="https://www.marwin.kz/product/serkebaeva-i-ermek-serkebaev-i-zhizn-i-molodost-i-schaste-220988"') expect(html).toContain('href="https://www.flip.kz/catalog?prod=6364653') - expect(html).toContain('href="https://erudit.kz/"') - expect(html).toContain('Книжный мир') + expect(html).toContain('
  • Эрудит
  • ') + expect(html).toContain('
  • Книжный мир
  • ') + expect(html).not.toContain('erudit.kz') expect(html).toContain('

    Наличие и стоимость книги уточняйте непосредственно у продавцов.

    ') }) it.each(['kk', 'en'] as const)('язык %s: те же магазины, без пометок', (l) => { const html = render(l) expect(html).toContain('href="https://www.marwin.kz/product/serkebaeva-i-ermek-serkebaev-i-zhizn-i-molodost-i-schaste-220988"') expect(html).toContain('href="https://www.flip.kz/catalog?prod=6364653') - expect(html).toContain('Эрудит') - expect(html).toContain('Книжный мир') + expect(html).toContain('
  • Эрудит
  • ') + expect(html).toContain('
  • Книжный мир
  • ') expect(html).not.toContain(getDict(l).tbc) }) }) diff --git a/src/lib/book-links.ts b/src/lib/book-links.ts index 55d511e..28fec62 100644 --- a/src/lib/book-links.ts +++ b/src/lib/book-links.ts @@ -1,9 +1,7 @@ import { bookUrl } from './home-model' -/** Адреса магазинов, где продаётся книга. Ключ — название на экране. */ +/** Адреса онлайн-площадок, где продаётся книга. Книжные магазины («Эрудит», «Книжный мир») — только текст, без ссылок (решение PM, QLFW-67). Ключ — название на экране. */ export const bookShopLinks: Record = { Marwin: 'https://www.marwin.kz/product/serkebaeva-i-ermek-serkebaev-i-zhizn-i-molodost-i-schaste-220988', 'Flip.kz': bookUrl, - 'Эрудит': 'https://erudit.kz/', - 'Книжный мир': null, // адрес не подтверждён — показываем без ссылки }