2025-09-23 20:13:31 +05:30
|
|
|
// App.tsx
|
2025-08-08 19:23:45 +05:30
|
|
|
import { Navigation } from "./components/Navigation";
|
2025-09-23 20:13:31 +05:30
|
|
|
import { Footer } from "./components/Footer";
|
2025-08-08 19:23:45 +05:30
|
|
|
import { CookieConsent } from "./components/CookieConsent";
|
2025-09-23 20:13:31 +05:30
|
|
|
import { AppRouter } from "./src/Router";
|
|
|
|
|
import { useLocation } from "react-router-dom";
|
|
|
|
|
import { useEffect } from "react";
|
2025-07-11 16:54:37 +05:30
|
|
|
|
|
|
|
|
// Smooth scroll to top function
|
|
|
|
|
const scrollToTop = () => {
|
2025-09-23 20:13:31 +05:30
|
|
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
2025-07-11 16:54:37 +05:30
|
|
|
};
|
|
|
|
|
|
2025-09-23 20:13:31 +05:30
|
|
|
function App() {
|
|
|
|
|
const location = useLocation();
|
2025-07-11 16:54:37 +05:30
|
|
|
|
2025-09-23 20:13:31 +05:30
|
|
|
// Scroll to top on route change
|
2025-07-11 16:54:37 +05:30
|
|
|
useEffect(() => {
|
2025-09-23 20:13:31 +05:30
|
|
|
scrollToTop();
|
|
|
|
|
}, [location.pathname]);
|
2025-07-11 16:54:37 +05:30
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="min-h-screen bg-background">
|
2025-09-23 20:13:31 +05:30
|
|
|
<Navigation />
|
|
|
|
|
<main>
|
|
|
|
|
<AppRouter />
|
|
|
|
|
</main>
|
|
|
|
|
<Footer />
|
2025-07-11 16:54:37 +05:30
|
|
|
<CookieConsent />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
2025-09-23 20:13:31 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|