Initial commit IP
This commit is contained in:
67
App.tsx
Normal file
67
App.tsx
Normal file
@@ -0,0 +1,67 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import { HashRouter as Router, Routes, Route, useLocation } from 'react-router-dom';
|
||||
import Navbar from './components/Navbar';
|
||||
import Footer from './components/Footer';
|
||||
import ScrollToTopButton from './components/ScrollToTop';
|
||||
import Home from './pages/Home';
|
||||
import ServicesPage from './pages/ServicesPage';
|
||||
import ProjectsPage from './pages/ProjectsPage';
|
||||
import AboutPage from './pages/AboutPage';
|
||||
import ContactsPage from './pages/ContactsPage';
|
||||
import FleetPage from './pages/FleetPage';
|
||||
import CertificatesPage from './pages/CertificatesPage';
|
||||
import SurveyingPage from './pages/SurveyingPage';
|
||||
import DesignPage from './pages/DesignPage';
|
||||
import ConstructionPage from './pages/ConstructionPage';
|
||||
import SoilSurveyPage from './pages/SoilSurveyPage';
|
||||
import BuildingSurveyPage from './pages/BuildingSurveyPage';
|
||||
import LandSurveyPage from './pages/LandSurveyPage';
|
||||
import TechnicalTasksPage from './pages/TechnicalTasksPage';
|
||||
import SoilLabPage from './pages/SoilLabPage';
|
||||
import RadiationLabPage from './pages/RadiationLabPage';
|
||||
import PrivacyPolicyPage from './pages/PrivacyPolicyPage';
|
||||
|
||||
// Scroll to top on route change
|
||||
const ScrollToTop = () => {
|
||||
const { pathname } = useLocation();
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0);
|
||||
}, [pathname]);
|
||||
return null;
|
||||
};
|
||||
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<Router>
|
||||
<div className="w-full bg-white overflow-hidden font-sans flex flex-col min-h-screen">
|
||||
<ScrollToTop />
|
||||
<Navbar transparent={true} />
|
||||
<main className="flex-grow">
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/services" element={<ServicesPage />} />
|
||||
<Route path="/services/surveying" element={<SurveyingPage />} />
|
||||
<Route path="/services/design" element={<DesignPage />} />
|
||||
<Route path="/services/construction" element={<ConstructionPage />} />
|
||||
<Route path="/services/soil-survey" element={<SoilSurveyPage />} />
|
||||
<Route path="/services/building-survey" element={<BuildingSurveyPage />} />
|
||||
<Route path="/services/land-survey" element={<LandSurveyPage />} />
|
||||
<Route path="/services/technical-tasks" element={<TechnicalTasksPage />} />
|
||||
<Route path="/projects" element={<ProjectsPage />} />
|
||||
<Route path="/fleet" element={<FleetPage />} />
|
||||
<Route path="/laboratories/soil" element={<SoilLabPage />} />
|
||||
<Route path="/laboratories/radiation" element={<RadiationLabPage />} />
|
||||
<Route path="/certificates" element={<CertificatesPage />} />
|
||||
<Route path="/about" element={<AboutPage />} />
|
||||
<Route path="/contacts" element={<ContactsPage />} />
|
||||
<Route path="/privacy-policy" element={<PrivacyPolicyPage />} />
|
||||
</Routes>
|
||||
</main>
|
||||
<Footer />
|
||||
<ScrollToTopButton />
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user