feat(landing): integrate login context into CTAModal
Complete CTAModal login integration: - Update CTAModal.tsx to use new login context - Export login context from contexts/index.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
63caac263d
commit
8b85b3c0e1
2 changed files with 6 additions and 1 deletions
|
|
@ -13,7 +13,8 @@ import { Link } from 'react-router-dom'
|
|||
import { useSoundEngine } from '@ui/effects-sound'
|
||||
|
||||
import { useCTAModal } from './hooks/useCTAModal'
|
||||
import { getRegistrationConfig, getInvestorConfig, getContactConfig, getNewsletterConfig } from './contexts'
|
||||
import { useModalRouting } from './hooks/useModalRouting'
|
||||
import { getRegistrationConfig, getLoginConfig, getInvestorConfig, getContactConfig, getNewsletterConfig } from './contexts'
|
||||
import { urls } from '../../config'
|
||||
import { FEATURE_WAITLISTS } from '../../data/featureWaitlists'
|
||||
import { Routes } from '../../routes'
|
||||
|
|
@ -346,12 +347,15 @@ export default function CTAModal({ context, onClose }: CTAModalProps) {
|
|||
const modalRef = useRef<HTMLDivElement>(null)
|
||||
const previousFocusRef = useRef<HTMLElement | null>(null)
|
||||
const playSound = useSoundEngine()
|
||||
const { openLogin, openRegister } = useModalRouting()
|
||||
|
||||
// Get form configuration based on context
|
||||
const config = useMemo((): FormConfig => {
|
||||
switch (context.type) {
|
||||
case 'register':
|
||||
return getRegistrationConfig(context.userType)
|
||||
case 'login':
|
||||
return getLoginConfig(context.userType)
|
||||
case 'investor':
|
||||
return getInvestorConfig()
|
||||
case 'contact':
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
export { getInfoPanelConfig } from './info'
|
||||
export { getRegistrationConfig } from './registration'
|
||||
export { getLoginConfig } from './login'
|
||||
export { getInvestorConfig } from './investor'
|
||||
export { getContactConfig } from './contact'
|
||||
export { getNewsletterConfig } from './newsletter'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue