diff --git a/Frontend/src/pages/HomePage.tsx b/Frontend/src/pages/HomePage.tsx index 011641d..1e6e770 100644 --- a/Frontend/src/pages/HomePage.tsx +++ b/Frontend/src/pages/HomePage.tsx @@ -110,7 +110,8 @@ const successStories = [ followers: "2.1M", brand: "TechFlow", result: "500% ROI increase", - story: "Sarah's authentic tech reviews helped TechFlow launch their new smartphone with record-breaking pre-orders.", + story: + "Sarah's authentic tech reviews helped TechFlow launch their new smartphone with record-breaking pre-orders.", avatar: "/avatars/sarah.jpg", platform: "YouTube", }, @@ -120,7 +121,8 @@ const successStories = [ followers: "850K", brand: "FitFuel", result: "300% engagement boost", - story: "Marcus's workout challenges with FitFuel products generated over 10M views and 50K+ app downloads.", + story: + "Marcus's workout challenges with FitFuel products generated over 10M views and 50K+ app downloads.", avatar: "/avatars/marcus.jpg", platform: "Instagram", }, @@ -130,7 +132,8 @@ const successStories = [ followers: "1.2M", brand: "EcoStyle", result: "200% sales increase", - story: "Emma's sustainable fashion content helped EcoStyle become the top eco-friendly brand in their category.", + story: + "Emma's sustainable fashion content helped EcoStyle become the top eco-friendly brand in their category.", avatar: "/avatars/emma.jpg", platform: "TikTok", }, @@ -223,7 +226,8 @@ const brandShowcase = [ name: "TechFlow", industry: "Technology", logo: "/brands/techflow.png", - description: "Leading smartphone manufacturer seeking tech reviewers and lifestyle creators", + description: + "Leading smartphone manufacturer seeking tech reviewers and lifestyle creators", followers: "2.5M", budget: "$5K - $50K", lookingFor: ["Tech Reviewers", "Lifestyle Creators", "Gaming Streamers"], @@ -233,7 +237,8 @@ const brandShowcase = [ name: "FitFuel", industry: "Health & Fitness", logo: "/brands/fitfuel.png", - description: "Premium fitness supplement brand looking for authentic fitness influencers", + description: + "Premium fitness supplement brand looking for authentic fitness influencers", followers: "1.8M", budget: "$3K - $25K", lookingFor: ["Fitness Trainers", "Nutrition Experts", "Wellness Coaches"], @@ -243,17 +248,23 @@ const brandShowcase = [ name: "EcoStyle", industry: "Sustainable Fashion", logo: "/brands/ecostyle.png", - description: "Eco-friendly fashion brand seeking sustainable lifestyle advocates", + description: + "Eco-friendly fashion brand seeking sustainable lifestyle advocates", followers: "950K", budget: "$2K - $20K", - lookingFor: ["Fashion Influencers", "Sustainability Advocates", "Lifestyle Creators"], + lookingFor: [ + "Fashion Influencers", + "Sustainability Advocates", + "Lifestyle Creators", + ], activeCampaigns: 2, }, { name: "GameZone", industry: "Gaming", logo: "/brands/gamezone.png", - description: "Gaming accessories company looking for esports and gaming content creators", + description: + "Gaming accessories company looking for esports and gaming content creators", followers: "3.2M", budget: "$4K - $40K", lookingFor: ["Gaming Streamers", "Esports Players", "Tech Reviewers"], @@ -264,22 +275,24 @@ const brandShowcase = [ // TrendingNichesSection: Fetches and displays trending niches from the backend function TrendingNichesSection() { // State for trending niches, loading, and error - const [niches, setNiches] = useState<{ name: string; insight: string; global_activity: number }[]>([]); + const [niches, setNiches] = useState< + { name: string; insight: string; global_activity: number }[] + >([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); // Fetch trending niches from the backend API on mount useEffect(() => { fetch("/api/trending-niches") - .then(res => { + .then((res) => { if (!res.ok) throw new Error("Failed to fetch trending niches"); return res.json(); }) - .then(data => { + .then((data) => { setNiches(data); setLoading(false); }) - .catch(err => { + .catch((err) => { setError(err.message); setLoading(false); }); @@ -289,7 +302,7 @@ function TrendingNichesSection() { if (error) return
Error: {error}
; // Emoji icons for visual variety in cards - const icons = ['🤖','🌱','🎮','💸','✈️','🧩']; + const icons = ["🤖", "🌱", "🎮", "💸", "✈️", "🧩"]; // Modern glassmorphism card design for each trending niche return ( @@ -306,7 +319,9 @@ function TrendingNichesSection() { {icons[idx % icons.length]} {/* Niche name */} -

{niche.name}

+

+ {niche.name} +

{/* Niche insight as a quote */}
“{niche.insight}” @@ -319,13 +334,15 @@ function TrendingNichesSection() {
= 4 - ? 'bg-gradient-to-r from-purple-500 to-blue-500' - : 'bg-gradient-to-r from-yellow-400 to-orange-500' + ? "bg-gradient-to-r from-purple-500 to-blue-500" + : "bg-gradient-to-r from-yellow-400 to-orange-500" }`} style={{ width: `${(niche.global_activity / 5) * 100}%` }} />
- {niche.global_activity}/5 + + {niche.global_activity}/5 + @@ -338,35 +355,66 @@ function WhyChooseSection() { return (
-

Why Choose Inpact AI?

+

+ Why Choose Inpact AI? +

- Powerful tools for both brands and creators to connect, collaborate, and grow. + Powerful tools for both brands and creators to connect, collaborate, + and grow.

{/* Brands Column */}
- For Brands + + For Brands +
    -
  • AI-driven creator matching for your campaigns
  • -
  • Real-time performance analytics & ROI tracking
  • -
  • Smart pricing & budget optimization
  • -
  • Streamlined communication & contract management
  • +
  • + AI-driven + creator matching for your campaigns +
  • +
  • + Real-time + performance analytics & ROI tracking +
  • +
  • + Smart pricing & + budget optimization +
  • +
  • + {" "} + Streamlined communication & contract management +
{/* Creators Column */}
- For Creators + + For Creators +
    -
  • Get discovered by top brands in your niche
  • -
  • Fair sponsorship deals & transparent payments
  • -
  • AI-powered content & contract assistant
  • -
  • Grow your audience & track your impact
  • +
  • + Get + discovered by top brands in your niche +
  • +
  • + Fair sponsorship + deals & transparent payments +
  • +
  • + AI-powered + content & contract assistant +
  • +
  • + Grow your audience & + track your impact +
@@ -377,7 +425,7 @@ function WhyChooseSection() { export default function HomePage() { const { isAuthenticated, user } = useAuth(); - + // Refs for scroll detection const featuresRef = useRef(null); const successStoriesRef = useRef(null); @@ -419,10 +467,12 @@ export default function HomePage() { { root: null, rootMargin: "0px", threshold: 0.1 } ); if (trendingRef.current) trendingObserver.observe(trendingRef.current); - if (successStoriesRef.current) brandsObserver.observe(successStoriesRef.current); + if (successStoriesRef.current) + brandsObserver.observe(successStoriesRef.current); return () => { if (trendingRef.current) trendingObserver.unobserve(trendingRef.current); - if (successStoriesRef.current) brandsObserver.unobserve(successStoriesRef.current); + if (successStoriesRef.current) + brandsObserver.unobserve(successStoriesRef.current); }; }, [hasAnimatedTrending, hasAnimatedBrands]); @@ -473,7 +523,7 @@ export default function HomePage() {
- +
{/* Left Image */} @@ -494,10 +544,16 @@ export default function HomePage() {
-
+
-
+
@@ -506,15 +562,22 @@ export default function HomePage() {
- Welcome back! + + Welcome back! +
{/* Main Welcome Heading */}

- Welcome, {user.user_metadata?.name || user.email?.split('@')[0]} + Welcome,{" "} + + {user.user_metadata?.name || user.email?.split("@")[0]} +

- Ready to grow your creator business? Explore new opportunities, track your performance, and connect with brands. + Ready to grow your creator business? Explore new + opportunities, track your performance, and connect with + brands.

{/* Action Buttons */} @@ -532,7 +595,10 @@ export default function HomePage() { size="lg" className="border-white/30 bg-white/10 backdrop-blur-sm text-gray-900 hover:bg-white/20 transition-all duration-300 px-8 py-4 text-lg" > - + Browse Opportunities @@ -541,15 +607,21 @@ export default function HomePage() {
- Create your profile + + Create your profile +
- Get matched by AI + + Get matched by AI +
- Collaborate & grow + + Collaborate & grow +
@@ -561,7 +633,10 @@ export default function HomePage() { {/* Trending Niches Section - Centered Grid, No Extra Right Space */} -
+

- Discover the fastest-growing content categories and opportunities. + Discover the fastest-growing content categories and + opportunities.

{/* Brand Showcase Section - Centered Grid, No Extra Right Space */} -
+

@@ -600,33 +679,47 @@ export default function HomePage() {
- {brand.name.split('').slice(0, 2).join('')} + {brand.name.split("").slice(0, 2).join("")}
-

{brand.name}

-

{brand.industry}

-

{brand.description}

+

+ {brand.name} +

+

+ {brand.industry} +

+

+ {brand.description} +

Followers

-

{brand.followers}

+

+ {brand.followers} +

Budget Range

-

{brand.budget}

+

+ {brand.budget} +

Active Campaigns

-

{brand.activeCampaigns}

+

+ {brand.activeCampaigns} +

Looking For

-

{brand.lookingFor.length} types

+

+ {brand.lookingFor.length} types +

@@ -639,11 +732,13 @@ export default function HomePage() { ))}
-
@@ -653,7 +748,10 @@ export default function HomePage() {
{/* Footer */} -