website icon indicating copy to clipboard operation
website copied to clipboard

Migrate BenefitsSection from JSX to TypeScript

Open mohanadft opened this issue 3 months ago • 0 comments

Description

The BenefitsSection.jsx component is currently written in plain JSX. Converting it to TypeScript (.tsx) would improve type safety and code maintainability.

Files to Update

  • Rename: src/components/BenefitsSection.jsxsrc/components/BenefitsSection.tsx
  • Update any imports in other files if needed

Task

  1. Rename the file from .jsx to .tsx
  2. Add proper TypeScript types for:
    • The benefits array items
    • Component props (if any)
    • Any other variables that could benefit from typing
  3. Test that the component still renders correctly

Example Type Definition

interface Benefit {
  title: string;
  description: string;
  icon: React.ReactElement;
}

const benefits: Benefit[] = [
  // ... benefits array
];

Acceptance Criteria

  • [ ] File is renamed to .tsx
  • [ ] Proper TypeScript types are added
  • [ ] No TypeScript errors
  • [ ] Component functions exactly as before
  • [ ] All imports are updated if needed

Resources

Great way to learn TypeScript with React!

mohanadft avatar Nov 13 '25 14:11 mohanadft