feat: implement login intent filtering for navigation links and remove unused components

This commit is contained in:
syntaxbullet
2026-07-09 12:19:40 +02:00
parent 57f2d58a8f
commit 5a08350b6a
7 changed files with 20 additions and 99 deletions

View File

@@ -14,6 +14,7 @@ import {
type SpaFooterData,
type SpaHeaderData,
type SpaIconName,
withoutLoginCtas,
} from '@/spa/cmsNavigation';
interface LayoutProps { children: React.ReactNode; header?: SpaHeaderData; footer?: SpaFooterData; }
@@ -70,10 +71,10 @@ const Layout: React.FC<LayoutProps> = ({ children, header = defaultHeaderData, f
: defaultFooterData.socialLinks.filter((item) => item.icon === 'linkedin');
const logo = header.logo?.url || defaultHeaderData.logo?.url || '';
const footerLogo = footer.logo?.url || defaultFooterData.logo?.url || '';
const headerCtas = header.ctas;
const footerCtas = footer.ctas;
const fallbackHeaderCtas = defaultHeaderData.ctas;
const fallbackFooterCtas = defaultFooterData.ctas;
const headerCtas = withoutLoginCtas(header.ctas);
const footerCtas = withoutLoginCtas(footer.ctas);
const fallbackHeaderCtas = withoutLoginCtas(defaultHeaderData.ctas);
const fallbackFooterCtas = withoutLoginCtas(defaultFooterData.ctas);
const applicationPhase = useApplicationPhase();
const showFloatingApplicationCta = applicationPhase?.activePhase === APPLICATION_PHASE_OPEN;
const footerMembershipCta = footerCtas[1] || fallbackFooterCtas[1];
@@ -373,34 +374,6 @@ const Layout: React.FC<LayoutProps> = ({ children, header = defaultHeaderData, f
onMouseLeave={e=>{ e.currentTarget.style.background='#EFBF04'; e.currentTarget.style.boxShadow='none'; }}
>{headerCtas[0]?.label || fallbackHeaderCtas[0].label}</Link>
<div style={{ height:'1px', background:'rgba(239,191,4,0.12)', margin:'4px 0' }} />
<Link to={headerCtas[2]?.path || fallbackHeaderCtas[2].path} onClick={() => setOpen(false)}
style={{
display:'flex', alignItems:'center', gap:10,
background:'transparent',
color:MUTED,
fontSize:11, fontWeight:700,
textTransform:'uppercase', letterSpacing:'.14em',
padding:'10px 18px',
textDecoration:'none',
fontFamily:FF_DISPLAY,
border:'1px solid rgba(239,191,4,0.28)',
transition:'color .2s, border-color .2s, background .2s',
}}
onMouseEnter={e=>{
e.currentTarget.style.color=GOLD;
e.currentTarget.style.borderColor='rgba(239,191,4,0.7)';
e.currentTarget.style.background='rgba(239,191,4,0.05)';
}}
onMouseLeave={e=>{
e.currentTarget.style.color=MUTED;
e.currentTarget.style.borderColor='rgba(239,191,4,0.28)';
e.currentTarget.style.background='transparent';
}}
>
{headerCtas[2]?.label || fallbackHeaderCtas[2].label}
</Link>
</div>
</div>
@@ -542,9 +515,6 @@ const Layout: React.FC<LayoutProps> = ({ children, header = defaultHeaderData, f
<Link to={headerCtas[0]?.path || fallbackHeaderCtas[0].path} onClick={() => setMobileOpen(false)}
style={{ display:'flex', alignItems:'center', justifyContent:'center', minHeight:52, background:GOLD, color:'#101828', fontSize:14, fontWeight:700, textTransform:'uppercase', letterSpacing:'.12em', textDecoration:'none', fontFamily:FF_DISPLAY }}
>{headerCtas[0]?.label || fallbackHeaderCtas[0].label}</Link>
<Link to={headerCtas[2]?.path || fallbackHeaderCtas[2].path} onClick={() => setMobileOpen(false)}
style={{ display:'flex', alignItems:'center', justifyContent:'center', minHeight:46, background:'none', color:MUTED, fontSize:11, fontWeight:700, textTransform:'uppercase', letterSpacing:'.14em', textDecoration:'none', fontFamily:FF_DISPLAY, border:'1px solid rgba(239,191,4,0.28)' }}
>{headerCtas[2]?.label || fallbackHeaderCtas[2].label}</Link>
</div>
{/* Footer zone: social + secondary */}