Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
30 changes: 28 additions & 2 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"react": "^19.1.0",
"react-chartjs-2": "^5.3.0",
"react-dom": "^19.1.0",
"react-hot-toast": "^2.6.0",
"react-icons": "^5.5.0",
"react-router-dom": "^6.30.1",
"recharts": "^3.0.2",
Expand Down
67 changes: 53 additions & 14 deletions client/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,70 @@
// import Header from "./components/Header";
// import Home from "./pages/Home";
// import Footer from "./components/Footer";

// function App() {
// return (
// <div className="min-h-screen bg-white">
// <Header />
// <Home />
// <Footer />
// </div>
// );
// }
// export default App;
import { Outlet } from "react-router-dom";
import Header from "./components/Header";
import Footer from "./components/Footer";
import ScrollToTop from "./components/ScrollToTop";
import { Toaster } from "react-hot-toast";

function App() {
return (
<div className="min-h-screen bg-white flex flex-col">
<ScrollToTop />
<Header />

<main className="flex-grow">
<Outlet /> {/* This will render the current page */}
</main>

<Footer />

{/* Global Toast container */}
<Toaster
position="top-right"
toastOptions={{
duration: 4000,
style: {
fontSize: "15px",
fontWeight: "600",
borderRadius: "14px",
padding: "14px 20px",
color: "#fff",
boxShadow: "0 6px 18px rgba(0,0,0,0.15)",
backgroundSize: "200% 200%",
animation: "gradientShift 3s ease infinite",
},
success: {
style: {
background: "linear-gradient(135deg, #34d399, #3b82f6)", // teal → blue
},
iconTheme: {
primary: "#10b981",
secondary: "#fff",
},
},
error: {
style: {
background: "linear-gradient(135deg, #f472b6, #a78bfa)", // pink → purple
},
iconTheme: {
primary: "#8b5cf6",
secondary: "#fff",
},
},
loading: {
style: {
background: "linear-gradient(135deg, #06b6d4, #3b82f6)", // cyan → blue
},
},
}}
/>

{/* Gradient animation keyframes */}
<style>{`
@keyframes gradientShift {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
`}</style>
</div>
);
}
Expand Down
Loading