feat(forms): add isolated Form A consultation testing
This commit is contained in:
25 files changed
+1046
-253
No files matched your search
@@ -53,6 +53,7 @@ const pageTitles: Record<string, Record<string, string>> = {
|
||||
};
|
||||
const bannerTitle = serviceTitles[entry.data.lang]?.[entry.data.slug] || pageTitles[entry.data.lang]?.[entry.data.slug] || entry.data.title.split('|')[0].trim();
|
||||
const isService = Boolean(serviceTitles[entry.data.lang]?.[entry.data.slug]);
|
||||
const route = entry.data.lang === 'en' ? `/${entry.data.slug}` : `/${entry.data.lang}/${entry.data.slug}`;
|
||||
const heroImage = pageHeroImages[entry.data.slug];
|
||||
if (entry.data.slug === 'team' && entry.data.lang === 'en' && !entry.data.team) {
|
||||
throw new Error('The English Team page requires structured team frontmatter.');
|
||||
@@ -78,6 +79,6 @@ if (entry.data.slug === 'team' && entry.data.lang === 'en' && !entry.data.team)
|
||||
: entry.data.slug === 'contact'
|
||||
? <ContactPage title={bannerTitle} lang={entry.data.lang}><slot /></ContactPage>
|
||||
: <article class:list={['prose', 'source-page', 'container', { 'service-page': isService }]}><slot /></article>}
|
||||
{isService && entry.data.lang === 'en' && <ServiceInquiryDrawer service={entry.data.slug} />}
|
||||
{showForm && <FormShell lang={entry.data.lang} title={bannerTitle} logicalForm={entry.data.slug === 'referrals' ? 'referral' : 'service'} showBackground={entry.data.slug === 'client-consultation'} />}
|
||||
{isService && (entry.data.lang === 'en' || entry.data.lang === 'es') && <ServiceInquiryDrawer service={entry.data.slug} lang={entry.data.lang} route={route} />}
|
||||
{showForm && <FormShell lang={entry.data.lang} route={route} title={bannerTitle} logicalForm={entry.data.slug === 'referrals' ? 'referral' : 'service'} showBackground={entry.data.slug === 'client-consultation'} />}
|
||||
</BaseLayout>
|
||||
Reference in new issue
Block a user