You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Home.jsx 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. //import FormSwitch from '../components/shared/FormSwitch';
  2. import PageHeading from './../components/shared/PageHeading';
  3. import Contact from '../components/shared/Contact';
  4. import BlogSection from '../components/BlogSection';
  5. import WhyUsCard from '../components/WhyUsCard';
  6. import HiringWidget from '../components/HiringWidget';
  7. import Animation_Diligent from '../assets/animation_diligent.webm';
  8. import '../styles/buttons.css';
  9. import '../styles/cards.css';
  10. //import bg_home from '../assets/logos/bg_home.png';
  11. //import post_1 from '../assets/logos/post_1.png';
  12. import { motion } from 'framer-motion';
  13. import { useState, useEffect, useRef, useLayoutEffect, useContext } from 'react';
  14. import axios from 'axios';
  15. import OrbitOnScroll from '../components/shared/graphics/OrbitOnScroll';
  16. import LandingSVG from '../components/shared/graphics/LandingSVG';
  17. import ServicesHome from '../components/ServicesHome';
  18. import Testimonials from '../components/Testimonials';
  19. import LandingSVGv2 from '../components/shared/graphics/LandingSVG-v2';
  20. import Landing from '../components/Landing';
  21. import WhySection from '../components/WhySection';
  22. import ProcessSection from '../components/ProcessSection';
  23. import TechStack from '../components/TechStack';
  24. import PortfolioSection from '../components/PortfolioSection';
  25. import PageLayout from '../layout/PageLayout';
  26. import MapDilig from '../components/Map';
  27. import useDataApi from '../hooks/useDataApi';
  28. import useAnalytics from '../hooks/useAnalytics';
  29. import ReactHelmet from '../components/shared/ReactHelmet';
  30. import { UIContext } from './../context/index';
  31. import { strapiApiBuilder } from './../utils/strapiApiBuilder';
  32. import TestimonialsDataLayer from '../api/TestimonialsDataLayer';
  33. import PortfolioDataLayer from '../api/PortfolioDataLayer';
  34. const api_url = process.env.REACT_APP_API_URL;
  35. const strapiPopulate = [
  36. 'Heading',
  37. 'Heading.subtitle',
  38. 'Heading.title',
  39. 'WhyUsHeading',
  40. 'Cards',
  41. 'Cards.Card1',
  42. 'Cards.Card1.Image',
  43. 'Cards.Card2',
  44. 'Cards.Card2.Image',
  45. 'Cards.Card3',
  46. 'Cards.Card3.Image',
  47. 'HeroNumbers',
  48. 'HeroNumbers.number',
  49. 'ProcessHeading',
  50. 'ProcessImage',
  51. 'TechStackHeading',
  52. 'ProcessMobileImg',
  53. 'ProcessMobileImg.Image',
  54. 'CaseStudies',
  55. 'Map',
  56. 'SEO',
  57. 'SEO.metaSocial',
  58. 'SEO.metaImage',
  59. 'SEO.metaSocial.image',
  60. 'BusinessInquiry',
  61. 'BusinessInquiry.image',
  62. 'ApplyPosition',
  63. 'ApplyPosition.image',
  64. ];
  65. export default function Home({ forwardedRef }) {
  66. const strapi = strapiApiBuilder('w-home-page', strapiPopulate, '');
  67. const [{ data, isLoading, isError }, doFetch] = useDataApi(strapi);
  68. useAnalytics('Home');
  69. useEffect(() => {
  70. document.title = 'Diligent Software';
  71. }, []);
  72. if (isLoading) {
  73. return (
  74. <div className="z-50 w-full h-screen bg-white dark:bg-dg-primary-1700 overflow-hidden dark:text-white flex items-center justify-center text-3xl font-semibold">
  75. <video id="animation" width="540" height="540" autoPlay muted loop>
  76. <source src={Animation_Diligent} type="video/webm" />
  77. Loading...
  78. </video>
  79. </div>
  80. );
  81. } else {
  82. return (
  83. <PageLayout>
  84. {(data && data.SEO) ? <ReactHelmet seo={data.SEO} /> : null}
  85. <div className="bg-white dark:bg-dg-primary-1700 w-full pt-32 overflow-hidden">
  86. {/* Landing Section */}
  87. {data ? (
  88. <Landing
  89. heading={data.Heading}
  90. numbers={data.HeroNumbers.number}
  91. paragraph={data.paragraph}
  92. button={data.button}
  93. />
  94. ) : null}
  95. {/* Why Us Section */}
  96. {data ? (
  97. <WhySection
  98. heading={data.WhyUsHeading}
  99. p1={data.WhyUsParagraph1}
  100. p2={data.WhyUsParagraph2}
  101. cards={data.Cards}
  102. />
  103. ) : null}
  104. {/* Our Process Section */}
  105. {data ? (
  106. <ProcessSection
  107. heading={data.ProcessHeading}
  108. btn={data.ProcessCTA}
  109. image={data.ProcessImage}
  110. mobileImages={data.ProcessMobileImg.Image}
  111. />
  112. ) : null}
  113. {/* Our Process Section */}
  114. {data ? (
  115. <TechStack heading={data.TechStackHeading} btn={data.TechStackCTA} />
  116. ) : null}
  117. {/* Testimonials Section*/}
  118. {data ? <TestimonialsDataLayer /> : null}
  119. {/* Portfolio Section*/}
  120. {data ? (
  121. <PortfolioSection
  122. heading={data.CaseStudies}
  123. cta={data.CtaForCaseStudiesCards}
  124. />
  125. ) : null}
  126. {/* Contact Section */}
  127. {data ? (
  128. <section id="contact" className="" ref={forwardedRef}>
  129. <Contact
  130. defaultIndex={true}
  131. position={''}
  132. job={data.ApplyPosition}
  133. business={data.BusinessInquiry}
  134. />
  135. </section>
  136. ) : null}
  137. {data ? <MapDilig heading={data.Map} /> : null}
  138. </div>
  139. </PageLayout>
  140. );
  141. }
  142. }