feat(i18n): internationalize footer and login modal components

- Update FooterSection to use language prop pattern instead of useLanguage hook
- Add language prop support to LoginModal component
- Ensure consistent internationalization approach across UI components
- Maintain proper prop interfaces for language handling
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: tinkle-community <tinklefund@gmail.com>
This commit is contained in:
icy
2025-11-02 06:22:16 +08:00
parent d8f0a154b4
commit b6cc1d2644
2 changed files with 26 additions and 18 deletions

View File

@@ -1,7 +1,13 @@
import { motion } from 'framer-motion'
import { X } from 'lucide-react'
import { t, Language } from '../../i18n/translations'
export default function LoginModal({ onClose }: { onClose: () => void }) {
interface LoginModalProps {
onClose: () => void
language: Language
}
export default function LoginModal({ onClose, language }: LoginModalProps) {
return (
<motion.div
className='fixed inset-0 z-50 flex items-center justify-center p-4'
@@ -23,10 +29,10 @@ export default function LoginModal({ onClose }: { onClose: () => void }) {
<X className='w-6 h-6' />
</motion.button>
<h2 className='text-2xl font-bold mb-6' style={{ color: 'var(--brand-light-gray)' }}>
访 NOFX
{t('accessNofxPlatform', language)}
</h2>
<p className='text-sm mb-6' style={{ color: 'var(--text-secondary)' }}>
访 AI
{t('loginRegisterPrompt', language)}
</p>
<div className='space-y-3'>
<motion.button
@@ -40,7 +46,7 @@ export default function LoginModal({ onClose }: { onClose: () => void }) {
whileHover={{ scale: 1.05, boxShadow: '0 10px 30px rgba(240, 185, 11, 0.4)' }}
whileTap={{ scale: 0.95 }}
>
{t('signIn', language)}
</motion.button>
<motion.button
onClick={() => {
@@ -53,7 +59,7 @@ export default function LoginModal({ onClose }: { onClose: () => void }) {
whileHover={{ scale: 1.05, borderColor: 'var(--brand-yellow)' }}
whileTap={{ scale: 0.95 }}
>
{t('registerNewAccount', language)}
</motion.button>
</div>
</motion.div>