refactor: remove unused props from section components for cleaner code

This commit is contained in:
2025-06-15 15:04:37 -05:00
parent fec7fb62de
commit 5f900bbceb
9 changed files with 6 additions and 54 deletions

View File

@@ -203,21 +203,14 @@ const App = () => {
isDarkMode={isDarkMode} isDarkMode={isDarkMode}
scrollToSection={scrollToSection} scrollToSection={scrollToSection}
textClasses={textClasses} textClasses={textClasses}
cardClasses={cardClasses}
/> />
{/* About Section */} {/* About Section */}
<AboutSection <AboutSection textClasses={textClasses} cardClasses={cardClasses} />
isDarkMode={isDarkMode}
scrollToSection={scrollToSection}
textClasses={textClasses}
cardClasses={cardClasses}
/>
{/* Academic Section */} {/* Academic Section */}
<AcademicSection <AcademicSection
isDarkMode={isDarkMode} isDarkMode={isDarkMode}
scrollToSection={scrollToSection}
textClasses={textClasses} textClasses={textClasses}
cardClasses={cardClasses} cardClasses={cardClasses}
/> />
@@ -225,7 +218,6 @@ const App = () => {
{/* Tech Section */} {/* Tech Section */}
<TechSection <TechSection
isDarkMode={isDarkMode} isDarkMode={isDarkMode}
scrollToSection={scrollToSection}
textClasses={textClasses} textClasses={textClasses}
cardClasses={cardClasses} cardClasses={cardClasses}
/> />
@@ -233,23 +225,16 @@ const App = () => {
{/* Leadership Section */} {/* Leadership Section */}
<LeadershipSection <LeadershipSection
isDarkMode={isDarkMode} isDarkMode={isDarkMode}
scrollToSection={scrollToSection}
textClasses={textClasses} textClasses={textClasses}
cardClasses={cardClasses} cardClasses={cardClasses}
/> />
{/* Athletics Section */} {/* Athletics Section */}
<AthleticsSection <AthleticsSection isDarkMode={isDarkMode} textClasses={textClasses} />
isDarkMode={isDarkMode}
scrollToSection={scrollToSection}
textClasses={textClasses}
cardClasses={cardClasses}
/>
{/* Entrepreneurship Section */} {/* Entrepreneurship Section */}
<EntrepreneurshipSection <EntrepreneurshipSection
isDarkMode={isDarkMode} isDarkMode={isDarkMode}
scrollToSection={scrollToSection}
textClasses={textClasses} textClasses={textClasses}
cardClasses={cardClasses} cardClasses={cardClasses}
/> />
@@ -262,12 +247,7 @@ const App = () => {
/> />
{/* Footer */} {/* Footer */}
<Footer <Footer isDarkMode={isDarkMode} textClasses={textClasses} />
isDarkMode={isDarkMode}
scrollToSection={scrollToSection}
textClasses={textClasses}
cardClasses={cardClasses}
/>
</div> </div>
); );
}; };

View File

@@ -1,18 +1,11 @@
import { Zap, Users, Rocket } from "lucide-react"; import { Zap, Users, Rocket } from "lucide-react";
interface AboutSectionProps { interface AboutSectionProps {
isDarkMode: boolean;
scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string; cardClasses: string;
} }
const AboutSection = ({ const AboutSection = ({ textClasses, cardClasses }: AboutSectionProps) => {
isDarkMode,
scrollToSection,
textClasses,
cardClasses,
}: AboutSectionProps) => {
return ( return (
<section id="about" className="relative py-20"> <section id="about" className="relative py-20">
<div className="max-w-6xl px-6 mx-auto"> <div className="max-w-6xl px-6 mx-auto">

View File

@@ -2,14 +2,12 @@ import { Trophy, Award, Star } from "lucide-react";
interface AcademicSectionProps { interface AcademicSectionProps {
isDarkMode: boolean; isDarkMode: boolean;
scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string; cardClasses: string;
} }
const AcademicSection = ({ const AcademicSection = ({
isDarkMode, isDarkMode,
scrollToSection,
textClasses, textClasses,
cardClasses, cardClasses,
}: AcademicSectionProps) => { }: AcademicSectionProps) => {

View File

@@ -1,15 +1,11 @@
interface AthleticsSectionProps { interface AthleticsSectionProps {
isDarkMode: boolean; isDarkMode: boolean;
scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string;
} }
const AthleticsSection = ({ const AthleticsSection = ({
isDarkMode, isDarkMode,
scrollToSection,
textClasses, textClasses,
cardClasses,
}: AthleticsSectionProps) => { }: AthleticsSectionProps) => {
return ( return (
<section id="athletics" className="py-20"> <section id="athletics" className="py-20">

View File

@@ -2,14 +2,12 @@ import { Rocket, Zap } from "lucide-react";
interface EntrepreneurshipSectionProps { interface EntrepreneurshipSectionProps {
isDarkMode: boolean; isDarkMode: boolean;
scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string; cardClasses: string;
} }
const EntrepreneurshipSection = ({ const EntrepreneurshipSection = ({
isDarkMode, isDarkMode,
scrollToSection,
textClasses, textClasses,
cardClasses, cardClasses,
}: EntrepreneurshipSectionProps) => { }: EntrepreneurshipSectionProps) => {

View File

@@ -1,16 +1,9 @@
interface FooterProps { interface FooterProps {
isDarkMode: boolean; isDarkMode: boolean;
scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string;
} }
const Footer = ({ const Footer = ({ isDarkMode, textClasses }: FooterProps) => {
isDarkMode,
scrollToSection,
textClasses,
cardClasses,
}: FooterProps) => {
return ( return (
<footer <footer
className={`py-12 ${ className={`py-12 ${

View File

@@ -1,17 +1,15 @@
import { ChevronDown, Trophy, Code, Users, Zap, Rocket } from "lucide-react"; import { ChevronDown, Trophy, Code, Rocket } from "lucide-react";
interface HeroSectionProps { interface HeroSectionProps {
isDarkMode: boolean; isDarkMode: boolean;
scrollToSection: (sectionId: string) => void; scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string;
} }
const HeroSection = ({ const HeroSection = ({
isDarkMode, isDarkMode,
scrollToSection, scrollToSection,
textClasses, textClasses,
cardClasses,
}: HeroSectionProps) => { }: HeroSectionProps) => {
return ( return (
<section <section

View File

@@ -2,14 +2,12 @@ import { Award, Star, Users } from "lucide-react";
interface LeadershipSectionProps { interface LeadershipSectionProps {
isDarkMode: boolean; isDarkMode: boolean;
scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string; cardClasses: string;
} }
const LeadershipSection = ({ const LeadershipSection = ({
isDarkMode, isDarkMode,
scrollToSection,
textClasses, textClasses,
cardClasses, cardClasses,
}: LeadershipSectionProps) => { }: LeadershipSectionProps) => {

View File

@@ -2,14 +2,12 @@ import { Code, Trophy } from "lucide-react";
interface TechSectionProps { interface TechSectionProps {
isDarkMode: boolean; isDarkMode: boolean;
scrollToSection: (sectionId: string) => void;
textClasses: string; textClasses: string;
cardClasses: string; cardClasses: string;
} }
const TechSection = ({ const TechSection = ({
isDarkMode, isDarkMode,
scrollToSection,
textClasses, textClasses,
cardClasses, cardClasses,
}: TechSectionProps) => { }: TechSectionProps) => {