La galería de trabajos (GaleriaTrabajos) en la landing personalizada del cliente pasa a formato apaisado (3/2) y, al pulsar una foto, se amplía en un lightbox con navegación ‹ ›, Esc y clic fuera para cerrar. Se quita el botón "Entrar" del header de esa landing (TenantBrand sin showLogin): el cliente final no entra al panel. Revierte el cambio anterior en public/b2b.html (era la landing equivocada). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
69 lines
2.5 KiB
TypeScript
69 lines
2.5 KiB
TypeScript
import type { Metadata } from 'next';
|
|
import { notFound } from 'next/navigation';
|
|
import Hero from '@/components/Hero/Hero';
|
|
import ReformaSlider from '@/components/ReformaSlider/ReformaSlider';
|
|
import Features from '@/components/Features/Features';
|
|
import QuienesSomos from '@/components/funnel/QuienesSomos';
|
|
import TestimoniosCliente from '@/components/funnel/TestimoniosCliente';
|
|
import GaleriaTrabajos from '@/components/funnel/GaleriaTrabajos';
|
|
import Footer from '@/components/Footer/Footer';
|
|
import TenantBrand from '@/components/funnel/TenantBrand';
|
|
import { getTenantBySlug, getPublishedTestimonios, getGaleria } from '@/lib/funnel/public-queries';
|
|
import { resolveTheme, themeStyle } from '@/lib/funnel/themes';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export async function generateMetadata({
|
|
params,
|
|
}: {
|
|
params: Promise<{ slug: string }>;
|
|
}): Promise<Metadata> {
|
|
const { slug } = await params;
|
|
const tenant = await getTenantBySlug(slug);
|
|
if (!tenant) return { title: 'Reforma no encontrada' };
|
|
return {
|
|
title: tenant.seoTitle ?? `${tenant.nombreEmpresa} · Presupuesto de reforma`,
|
|
description:
|
|
tenant.seoDescription ??
|
|
`Pide tu presupuesto de reforma a ${tenant.nombreEmpresa}. Render IA y presupuesto orientativo en minutos.`,
|
|
};
|
|
}
|
|
|
|
export default async function FunnelPage({ params }: { params: Promise<{ slug: string }> }) {
|
|
const { slug } = await params;
|
|
const tenant = await getTenantBySlug(slug);
|
|
if (!tenant) notFound();
|
|
|
|
const [testimonios, galeria] = await Promise.all([
|
|
getPublishedTestimonios(tenant.id),
|
|
getGaleria(tenant.id),
|
|
]);
|
|
|
|
const theme = resolveTheme(tenant.themePreset, tenant.themeColor);
|
|
|
|
return (
|
|
<div
|
|
className={theme.heading === 'serif' ? 'theme-serif' : undefined}
|
|
style={themeStyle(tenant.themePreset, tenant.themeColor)}
|
|
>
|
|
<TenantBrand nombreEmpresa={tenant.nombreEmpresa} logoUrl={tenant.logoUrl} />
|
|
<main id="main-content">
|
|
<Hero slug={tenant.slug} />
|
|
<ReformaSlider />
|
|
<Features />
|
|
{tenant.aboutEnabled && tenant.aboutTexto && (
|
|
<QuienesSomos
|
|
nombreEmpresa={tenant.nombreEmpresa}
|
|
fotoUrl={tenant.aboutFotoUrl}
|
|
texto={tenant.aboutTexto}
|
|
aniosExperiencia={tenant.aniosExperiencia}
|
|
/>
|
|
)}
|
|
<GaleriaTrabajos fotos={galeria} nombreEmpresa={tenant.nombreEmpresa} />
|
|
{testimonios.length > 0 && <TestimoniosCliente testimonios={testimonios} />}
|
|
</main>
|
|
<Footer />
|
|
</div>
|
|
);
|
|
}
|