-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.jsx
55 lines (50 loc) · 1.75 KB
/
App.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import React, { Suspense, useState, useEffect } from "react";
import Loader from "./components/Loader";
// const Navbar = React.lazy(() => import("./components/Navbar"));
// const LandingHero = React.lazy(() => import("./components/LandingHero"));
// const About = React.lazy(() => import("./components/About"));
// const WhatWeDo = React.lazy(() => import("./components/WhatWeDo"));
// const Services = React.lazy(() => import("./components/Services"));
// const ContactForm = React.lazy(() => import("./components/ContactForm"));
// const ContactUsHero = React.lazy(() => import("./components/ContactUsHero"));
// const Footer = React.lazy(() => import("./components/Footer"));
import Navbar from "./components/Navbar";
import LandingHero from "./components/LandingHero";
import About from "./components/About";
import WhatWeDo from "./components/WhatWeDo";
import Services from "./components/Services";
import ContactForm from "./components/ContactForm";
import ContactUsHero from "./components/ContactUsHero";
import Footer from "./components/Footer";
import PastWork from "./components/PastWork";
const App = () => {
const [loading, setLoading] = useState(true);
useEffect(() => {
const timeout = setTimeout(() => {
setLoading(false);
}, 3300);
return () => clearTimeout(timeout);
}, []);
return (
<React.Fragment>
{loading ? (
<Loader />
) : (
<Suspense fallback={<Loader />}>
<div className="h-screen">
<Navbar />
<LandingHero />
</div>
<About />
<WhatWeDo />
<Services />
<ContactForm />
<PastWork />
<ContactUsHero />
<Footer />
</Suspense>
)}
</React.Fragment>
);
};
export default App;