Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { HashRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
import { BrowserRouter as Router, Routes, Route, Navigate, BrowserRouter } from 'react-router-dom';
import Layout from './Layout';
import Home from './pages/Home';
import ContactUs from './pages/ContactUs';
Expand Down Expand Up @@ -56,7 +56,7 @@ function App() {
}
return (

<Router>
<BrowserRouter>
<ToastContainer autoClose={2000} position="top-center" newestOnTop />

<Layout setLoggedIn={setLoggedIn}>
Expand Down Expand Up @@ -90,7 +90,7 @@ function App() {
<Route path='*' element={ <Error/>} />
</Routes>
</Layout>
</Router>
</BrowserRouter>
);
}

Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Accordian/Accordian.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const Accordian = () => {
FAQs
</p>
{data.map((item, i) => (
<div className="ss">
<div className="item py-2" key={i} data-aos="fade-up" data-aos-dealy="100">
<div className="ss" key={i}> {/* key = {i} should be here */}
<div className="item py-2" data-aos="fade-up" data-aos-dealy="100">
<div className="title" onClick={() => toggle(i)}>
<h2 className=" text-lg md:text-xl text-green-600 font-semibold mb-2 font-Rubik" >
{item.question}
</h2>
<span>{selected === i ? "-" : "+"}</span>
<span className="cursor-pointer">{selected === i ? "-" : "+"}</span>
</div>
<div className={selected === i ? "content show" : "content"}>
<div className="">
Expand Down
30 changes: 11 additions & 19 deletions client/src/components/Footer2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,29 @@ const Footer2 = () =>{
<footer className="bg-gray-900 shadow ">
<div className="w-full max-w-screen-xl mx-auto p-4 md:py-8">
<div className="sm:flex sm:items-center sm:justify-between">
<a href="#" className="flex items-center mb-4 sm:mb-0 space-x-3 rtl:space-x-reverse">
<Link to="/" className="flex items-center mb-4 sm:mb-0 space-x-3 rtl:space-x-reverse">

<img src={logo2} className="h-16" alt="Logo" />

</a>
</Link>
<ul className="flex flex-wrap items-center mb-6 text-sm font-medium text-gray-500 sm:mb-0 dark:text-gray-400">
<Link to="/aboutUs">
<li>
<a href="#" className="hover:underline me-4 md:me-6">About</a>
</li>
<Link to="/aboutUs" className="hover:underline me-4 md:me-6">
<li>About</li>
</Link>
<Link to="/calculator">
<li>
<a href="#" className="hover:underline me-4 md:me-6">Calculator</a>
</li>
<Link to="/calculator" className="hover:underline me-4 md:me-6">
<li>Calculator</li>
</Link>
<Link to="/information">
<li>
<a href="#" className="hover:underline me-4 md:me-6">Information</a>
</li>
<Link to="/information" className="hover:underline me-4 md:me-6">
<li>Information</li>
</Link>
<Link to="/contactUs">
<li>
<a href="#" className="hover:underline">Contact</a>
</li>
<Link to="/contactUs" className="hover:underline">
<li>Contact</li>
</Link>
</ul>
</div>
<hr className="my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8" />
<Visit />
<span className="block text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2024 <a href="#" className="hover:underline">PrithWe™</a>. All Rights Reserved.</span>
<span className="block text-sm text-gray-500 sm:text-center dark:text-gray-400">© 2024 <Link to="/" className="hover:underline">PrithWe™</Link>. All Rights Reserved.</span>
</div>
</footer>
);
Expand Down
12 changes: 6 additions & 6 deletions client/src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ const handleMenuClick = () => {
className={` flex flex-wrap items-center justify-between p-2 `}
>
<div className="logo flex space-x-2 items-center ">
<a href="#">
<img className="h-12" src={leaf} />
</a>
<a href="#">
<img className="h-7" src={logo} />
</a>
<Link to="/">
<img className="h-12" src={leaf} />
</Link>
<Link to="/">
<img className="h-7" src={logo} />
</Link>
</div>

<div className=" md:hidden flex items-center justify-center">
Expand Down
6 changes: 3 additions & 3 deletions client/src/components/Hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ function Hero() {
calculate their environmental impact accurately with easy-to-use
tools and insightful data.
</div>
<div className="btn w-fit bg-green-500 font-Rubik p-2 md:py-3 px-3 rounded-2xl hover:bg-green-600">
<Link to="/calculator">Track Your Carbon Footprint</Link>
</div>
<Link to="/calculator"><div className="btn w-fit bg-green-500 font-Rubik p-2 md:py-3 px-3 rounded-2xl hover:bg-green-600">
Track Your Carbon Footprint
</div></Link>
</div>
<div className="gif">
<img className="rounded-lg hidden sm:block md:max-w-sm" src={giffy} data-aos="fade-left"/>
Expand Down
3 changes: 2 additions & 1 deletion client/src/pages/Information.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { Link } from 'react-router-dom';

const Information = () => {
return (
Expand Down Expand Up @@ -42,7 +43,7 @@ const Information = () => {
<p className="text-gray-700 mb-4">
Take the first step towards a sustainable future with PrithWe. Empower your business to make informed decisions, reduce your carbon footprint, and contribute to a greener and more resilient world.
</p>
<a href='#'><button className="bg-green-500 text-white py-2 px-6 rounded-lg hover:bg-green-600">Get Started with PrithWe</button></a>
<Link to='/'><button className="bg-green-500 text-white py-2 px-6 rounded-lg hover:bg-green-600">Get Started with PrithWe</button></Link>
</section>
</div>
);
Expand Down