Skip to content

Add "Did You Know?" Environmental Facts Section #52

@Eshaan-byte

Description

@Eshaan-byte

Description

Create an educational component that displays random environmental facts to help users learn more about carbon emissions and sustainability while using the app!

Task

Create a "Did You Know?" section that shows interesting environmental facts related to carbon emissions.

What You Need to Do

  1. Create a new file src/constants/environmentalFacts.ts with an array of facts
  2. Create a component EnvironmentalFacts.tsx in src/components/ui/
  3. Display a random fact each time the component loads
  4. Add a "Next Fact" button to cycle through facts
  5. Style it to match the app's eco-friendly theme (green gradients)

Example Facts

export const ENVIRONMENTAL_FACTS = [
  {
    id: 1,
    fact: "Sending 65 emails is roughly equivalent to driving 1 kilometer in a car.",
    icon: "📧",
  },
  {
    id: 2,
    fact: "The internet produces about 900 million tons of CO2 annually - similar to the aviation industry.",
    icon: "🌐",
  },
  {
    id: 3,
    fact: "Streaming video in HD uses about 8x more data than standard definition, resulting in higher emissions.",
    icon: "📺",
  },
  // Add at least 10 facts
];
Example Component Design
┌────────────────────────────────────┐
  💡 Did You Know?                 
                                    
  🌍 The internet produces about   
  900 million tons of CO2          
  annually - similar to aviation!  
                                    
  [Next Fact ]                    
└────────────────────────────────────┘
Acceptance Criteria
 Create constants file with at least 10 environmental facts
 Component displays random fact on load
 "Next Fact" button shows different fact
 Attractive card design with icon
 Responsive design
 Facts are educational and accurate
Where to Add
You can add this component to the Dashboard or create a dedicated section in the main page.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions