fix: define CardProps interface and fix prop name mismatch

- Add missing CardProps interface definition
- Fix TestimonialCard to use 'authorName' instead of 'author'
- Resolves TypeScript compilation error: 'Cannot find name CardProps'
- Fixes frontend build failure in CI

Fixes the type error:
src/components/landing/CommunitySection.tsx(32,16): error TS2304: Cannot find name 'CardProps'.
This commit is contained in:
ZhouYongyou
2025-11-03 19:45:59 +08:00
parent 563fb0e85d
commit 1e1f4cc36b

View File

@@ -1,7 +1,16 @@
import { motion } from 'framer-motion'
import AnimatedSection from './AnimatedSection'
function TestimonialCard({ quote, author, delay }: any) {
interface CardProps {
quote: string
authorName: string
handle: string
avatarUrl: string
tweetUrl: string
delay: number
}
function TestimonialCard({ quote, authorName, delay }: CardProps) {
return (
<motion.div
className='p-6 rounded-xl'
@@ -18,7 +27,7 @@ function TestimonialCard({ quote, author, delay }: any) {
<div className='flex items-center gap-2'>
<div className='w-8 h-8 rounded-full' style={{ background: 'var(--binance-yellow)' }} />
<span className='text-sm font-semibold' style={{ color: 'var(--text-secondary)' }}>
{author}
{authorName}
</span>
</div>
</motion.div>