fix: logo absolute URL, dyvolis tickets priority, why-section layout, birthday extra CMS items
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions

- Header: strip hostname from Payload media URL in resolveLogoUrl (was showing IP)
- DyvoLisTickets: prefer 'dyvolis' category over 'dyno' for single tickets
- DyvoLisWhyVisit: narrow accordion (628→480px), remove video max-w cap
- migration 0017: seed 3 extra birthday package items (rows 4-6) so CMS block is editable

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vadym Samoilenko 2026-06-08 14:38:41 +01:00
parent fc73909ea4
commit 00612e7d69
4 changed files with 15 additions and 4 deletions

View file

@ -0,0 +1,11 @@
-- 0017: seed extra "Також можна додатково замовити" items into birthday_page_package_items
INSERT INTO birthday_page_package_items (_order, _parent_id, id, title, description, cta_label)
SELECT * FROM (VALUES
(4, 1, gen_random_uuid(), 'Костюмованих ведучих', 'Професіональні аніматори, які знають, як захопити увагу малечі, аби усі брали участь у розвагах і ніхто не залишився осторонь.', 'Замовити'),
(5, 1, gen_random_uuid(), 'Аквагрим', 'Унікальні малюнки та візерунки безпечними фарбами, які допоможуть дітлахам перетворитися на улюблених казкових героїв.', 'Замовити'),
(6, 1, gen_random_uuid(), 'Затишну альтанку', 'Простір для смачного частування гостей та дорослих розмов, поки діти на повну занурені у квести, розваги та атракціони.', 'Замовити')
) AS v(_order, _parent_id, id, title, description, cta_label)
WHERE NOT EXISTS (
SELECT 1 FROM birthday_page_package_items WHERE _order >= 4 AND _parent_id = 1
);

View file

@ -9,7 +9,7 @@ function resolveLogoUrl(logo: unknown): string | null {
if (typeof logo === 'string') return logo
if (typeof logo === 'object' && logo !== null && 'url' in logo) {
const url = (logo as { url?: string | null }).url
return url ?? null
return url?.replace(/^https?:\/\/[^/]+/, '') ?? null
}
return null
}

View file

@ -136,7 +136,7 @@ export function DyvoLisTickets({
const all = data.tariffs ?? []
const dyno = all.filter((t) => t.categoryTag === 'dyno')
const fallback = all.filter((t) => t.categoryTag === 'dyvolis')
setSingle(dyno.length > 0 ? dyno : fallback)
setSingle(fallback.length > 0 ? fallback : dyno)
setCombo(all.filter((t) => t.categoryTag === 'combo'))
})
.catch(() => {

View file

@ -136,7 +136,7 @@ export function DyvoLisWhyVisit({
<button
key={i}
onClick={() => handleItemClick(i)}
className="flex w-full flex-col gap-2.5 rounded-[10px] bg-[#f1fbeb] px-[50px] py-[20px] text-left shadow-[0_4px_60px_0_rgba(242,139,74,0.25)] transition-all duration-200 lg:w-[628px]"
className="flex w-full flex-col gap-2.5 rounded-[10px] bg-[#f1fbeb] px-[50px] py-[20px] text-left shadow-[0_4px_60px_0_rgba(242,139,74,0.25)] transition-all duration-200 lg:w-[480px]"
aria-expanded={isOpen}
>
<div className="flex items-center gap-5">
@ -184,7 +184,7 @@ export function DyvoLisWhyVisit({
{/* Right: video review carousel */}
<div className="w-full flex-1">
<div
className="relative mx-auto max-w-[600px] overflow-hidden rounded-[20px] lg:mx-0"
className="relative mx-auto overflow-hidden rounded-[20px] lg:mx-0"
style={{ aspectRatio: '4/3' }}
onMouseEnter={() => {
videoPausedRef.current = true