diff --git a/apps/gatsby/package.json b/apps/gatsby/package.json index a6bd7fe..1882324 100644 --- a/apps/gatsby/package.json +++ b/apps/gatsby/package.json @@ -18,7 +18,7 @@ "develop:gatsby": "gatsby develop", "lint": "pnpm run lint:syntax && pnpm run lint:style", "lint:syntax": "eslint", - "lint:style": "prettier -u -c ./src/**/*.**", + "lint:style": "prettier -u -c ./src", "start": "gatsby develop", "serve": "gatsby serve", "typecheck": "tsc --noEmit" diff --git a/apps/gatsby/src/api-client/hooks/useApiClient.tsx b/apps/gatsby/src/api-client/hooks/useApiClient.tsx index 8d26530..9cf803a 100644 --- a/apps/gatsby/src/api-client/hooks/useApiClient.tsx +++ b/apps/gatsby/src/api-client/hooks/useApiClient.tsx @@ -1,5 +1,5 @@ -import { ApiClient } from "../getApiClient" +import { ApiClient } from "../getApiClient"; export const useApiClient = () => { - return ApiClient.getInstance().client -} + return ApiClient.getInstance().client; +}; diff --git a/apps/gatsby/src/components/book-call/BookCallEmbed.tsx b/apps/gatsby/src/components/book-call/BookCallEmbed.tsx index c046167..143de8a 100644 --- a/apps/gatsby/src/components/book-call/BookCallEmbed.tsx +++ b/apps/gatsby/src/components/book-call/BookCallEmbed.tsx @@ -1,4 +1,11 @@ -import React, { MouseEventHandler, useCallback, useContext, useEffect, useRef, useState } from "react" +import React, { + MouseEventHandler, + useCallback, + useContext, + useEffect, + useRef, + useState, +} from "react"; import { companyContactInformation } from "../../configuration/companyContactInformation"; import { UsercentricsContext } from "../usercentrics/UsercentricsProvider"; @@ -12,29 +19,34 @@ declare global { } export const BookCallEmbed = ({ enabled = true }: { enabled?: boolean }) => { - const divRef = useRef(null) + const divRef = useRef(null); const [calendlyInitialized, setCalendlyInitialized] = useState(false); const url = companyContactInformation.launchCallUrl; - const { isClientSide, isInitialized, hasServiceConsent, acceptService } = useContext(UsercentricsContext) - const [isAccepted, setIsAccepted] = useState(hasServiceConsent && hasServiceConsent("Calendly")) + const { isClientSide, isInitialized, hasServiceConsent, acceptService } = + useContext(UsercentricsContext); + const [isAccepted, setIsAccepted] = useState(hasServiceConsent && hasServiceConsent("Calendly")); - const shouldInitCalendly = () => enabled && + const shouldInitCalendly = () => + enabled && isInitialized && !calendlyInitialized && hasServiceConsent && hasServiceConsent("Calendly") && isClientSide && - divRef.current + divRef.current; - const provideConsent: MouseEventHandler = useCallback((e) => { - e.preventDefault() - if (acceptService) { - acceptService("Calendly").then(() => { - setIsAccepted(true) - initCalendly() - }) - } - }, [acceptService, shouldInitCalendly()]) + const provideConsent: MouseEventHandler = useCallback( + (e) => { + e.preventDefault(); + if (acceptService) { + acceptService("Calendly").then(() => { + setIsAccepted(true); + initCalendly(); + }); + } + }, + [acceptService, shouldInitCalendly()], + ); const initCalendly = useCallback(() => { if (shouldInitCalendly()) { @@ -45,25 +57,35 @@ export const BookCallEmbed = ({ enabled = true }: { enabled?: boolean }) => { parentElement: divRef.current, }); setCalendlyInitialized(true); - window.clearInterval(interval) + window.clearInterval(interval); } - }, 500) + }, 500); } - - }, [shouldInitCalendly()]) + }, [shouldInitCalendly()]); useEffect(() => { - initCalendly() - }, [shouldInitCalendly()]) + initCalendly(); + }, [shouldInitCalendly()]); - const div =
+ const div =
; - const consentNotice = (!calendlyInitialized && (!hasServiceConsent || !hasServiceConsent("Calendly"))) && <> -

We use Calendly to embed content that may collect data about your activity.

-

Please provide consent to connect to our partner, Calendly

- - return <> - {consentNotice} - {div} - -} + const consentNotice = !calendlyInitialized && + (!hasServiceConsent || !hasServiceConsent("Calendly")) && ( + <> +

We use Calendly to embed content that may collect data about your activity.

+

+ Please provide{" "} + + consent + {" "} + to connect to our partner, Calendly +

+ + ); + return ( + <> + {consentNotice} + {div} + + ); +}; diff --git a/apps/gatsby/src/components/book-call/hooks/useBookCallModal.tsx b/apps/gatsby/src/components/book-call/hooks/useBookCallModal.tsx index 8a5cbab..82186f9 100644 --- a/apps/gatsby/src/components/book-call/hooks/useBookCallModal.tsx +++ b/apps/gatsby/src/components/book-call/hooks/useBookCallModal.tsx @@ -14,10 +14,9 @@ export const useBookCallModal = () => { setVisibility: setModalVisibility, } = useModal(() => , { scrollToTop: false, - size: "large" + size: "large", }); - useEffect(() => { window.addEventListener("message", (e) => { if (e.data.event && e.data.event.indexOf("calendly")) { diff --git a/apps/gatsby/src/components/contact-page/ContactForm.tsx b/apps/gatsby/src/components/contact-page/ContactForm.tsx index c45a166..7c5ee4b 100644 --- a/apps/gatsby/src/components/contact-page/ContactForm.tsx +++ b/apps/gatsby/src/components/contact-page/ContactForm.tsx @@ -157,17 +157,13 @@ export const ContactForm = () => {
-

- Stop Stressing. Start Shipping. -

+

Stop Stressing. Start Shipping.

Fill out the form below and tell us more about your project. We’ll get back to you within a business day to start making your vision a reality.

{isSuccess ? ( -

- Thanks for your inquiry. We'll be in touch! -

+

Thanks for your inquiry. We'll be in touch!

) : ( formContent )} diff --git a/apps/gatsby/src/components/general/Policy.tsx b/apps/gatsby/src/components/general/Policy.tsx index 3703da3..08dcc16 100644 --- a/apps/gatsby/src/components/general/Policy.tsx +++ b/apps/gatsby/src/components/general/Policy.tsx @@ -1,29 +1,29 @@ -import React, { useEffect } from 'react'; +import React, { useEffect } from "react"; type PolicyProps = { policyKey?: string; }; -const termageddonAPIPath = 'https://app.termageddon.com/api/policy/'; +const termageddonAPIPath = "https://app.termageddon.com/api/policy/"; export const Policy = ({ policyKey }: PolicyProps) => { useEffect(() => { - const policy = document.getElementById('policy'); + const policy = document.getElementById("policy"); if (policy === null || policyKey === undefined) { - console.log('Error! Could not find policy element or policy key.'); + console.log("Error! Could not find policy element or policy key."); } else { const pol_key = policyKey; - const pol_extra = policy.dataset.extra ? '?' + policy.dataset.extra : ''; + const pol_extra = policy.dataset.extra ? "?" + policy.dataset.extra : ""; const xhr = new XMLHttpRequest(); xhr.onload = () => { policy.innerHTML = xhr.responseText; }; xhr.onerror = function () { - policy.innerHTML = 'There has been an error loading this policy!'; + policy.innerHTML = "There has been an error loading this policy!"; }; - xhr.open('GET', termageddonAPIPath + pol_key + pol_extra); + xhr.open("GET", termageddonAPIPath + pol_key + pol_extra); xhr.send(); } }, [policyKey]); @@ -32,8 +32,8 @@ export const Policy = ({ policyKey }: PolicyProps) => {
); diff --git a/apps/gatsby/src/components/icons/CommunityIcon.tsx b/apps/gatsby/src/components/icons/CommunityIcon.tsx index 859ba32..70de02f 100644 --- a/apps/gatsby/src/components/icons/CommunityIcon.tsx +++ b/apps/gatsby/src/components/icons/CommunityIcon.tsx @@ -46,7 +46,10 @@ export const CommunityIcon = ({ className="community-icon-1" d="m47.995,34.389c.009-.131.009-.271.009-.402,0-7.728-6.259-13.987-13.987-13.987s-13.987,6.259-13.987,13.987,6.259,13.987,13.987,13.987" /> - + - + - - + diff --git a/apps/gatsby/src/components/icons/RiskAssessmentIcon.tsx b/apps/gatsby/src/components/icons/RiskAssessmentIcon.tsx index 8ae0bdc..2a2120e 100644 --- a/apps/gatsby/src/components/icons/RiskAssessmentIcon.tsx +++ b/apps/gatsby/src/components/icons/RiskAssessmentIcon.tsx @@ -56,7 +56,10 @@ export const RiskAssessmentIcon = ({ - + diff --git a/apps/gatsby/src/components/index-page/ContactForm.tsx b/apps/gatsby/src/components/index-page/ContactForm.tsx index d06117c..551dba0 100644 --- a/apps/gatsby/src/components/index-page/ContactForm.tsx +++ b/apps/gatsby/src/components/index-page/ContactForm.tsx @@ -163,17 +163,13 @@ export const IndexFormSection = () => { />
-

- Stop Stressing. Start Shipping. -

+

Stop Stressing. Start Shipping.

Fill out the form below and tell us more about your project. We’ll get back to you within a business day to start making your vision a reality.

{isSuccess ? ( -

- Thanks for your inquiry. We'll be in touch! -

+

Thanks for your inquiry. We'll be in touch!

) : ( formContent )} diff --git a/apps/gatsby/src/components/index-page/IndexLaunched.tsx b/apps/gatsby/src/components/index-page/IndexLaunched.tsx index f4f8f35..7ea5dc9 100644 --- a/apps/gatsby/src/components/index-page/IndexLaunched.tsx +++ b/apps/gatsby/src/components/index-page/IndexLaunched.tsx @@ -89,6 +89,6 @@ export const IndexLaunched = () => { Book My Launch Call
-
- ) -} \ No newline at end of file +
+ ); +}; diff --git a/apps/gatsby/src/components/index-page/IndexLogos.tsx b/apps/gatsby/src/components/index-page/IndexLogos.tsx index 6fe7229..ed12353 100644 --- a/apps/gatsby/src/components/index-page/IndexLogos.tsx +++ b/apps/gatsby/src/components/index-page/IndexLogos.tsx @@ -7,22 +7,42 @@ export const IndexLogos = () => (
  • - +
  • - +
  • - +
  • - +
  • - +
diff --git a/apps/gatsby/src/components/index-page/IndexScorecard.tsx b/apps/gatsby/src/components/index-page/IndexScorecard.tsx index 5a374ae..6e2017b 100644 --- a/apps/gatsby/src/components/index-page/IndexScorecard.tsx +++ b/apps/gatsby/src/components/index-page/IndexScorecard.tsx @@ -25,7 +25,11 @@ export const IndexScorecard = () => { Success Scorecard. By answering just 21 quick questions, you’ll see if you’re set up for success – or what you need to change for you to reach your goals.

- diff --git a/apps/gatsby/src/components/layout/Footer.tsx b/apps/gatsby/src/components/layout/Footer.tsx index 06c91fd..aed9536 100644 --- a/apps/gatsby/src/components/layout/Footer.tsx +++ b/apps/gatsby/src/components/layout/Footer.tsx @@ -1,36 +1,40 @@ -import React, { MouseEventHandler } from "react" -import { LaunchWareLogoLight } from "./LaunchWareLogoLight" -import { Link, Script } from "gatsby" -import { companySocialProfiles } from "../../configuration/getCompanySocialProfile" -import { CompanySocialIcon } from "../social/CompanySocialIcon" -import { companyContactInformation } from "../../configuration/companyContactInformation" +import React, { MouseEventHandler } from "react"; +import { LaunchWareLogoLight } from "./LaunchWareLogoLight"; +import { Link, Script } from "gatsby"; +import { companySocialProfiles } from "../../configuration/getCompanySocialProfile"; +import { CompanySocialIcon } from "../social/CompanySocialIcon"; +import { companyContactInformation } from "../../configuration/companyContactInformation"; -import "./css/footer.css" -import { TrackingCodes } from "./TrackingCodes" -import { useBookCallModal } from "../book-call/hooks/useBookCallModal" -import { OptInForm } from "../opt-in/OptInForm" -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" -import { faEnvelope, faPhone, faSms } from "@fortawesome/free-solid-svg-icons" -import { UC_UI } from "../usercentrics/UsercentricsProvider" +import "./css/footer.css"; +import { TrackingCodes } from "./TrackingCodes"; +import { useBookCallModal } from "../book-call/hooks/useBookCallModal"; +import { OptInForm } from "../opt-in/OptInForm"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faEnvelope, faPhone, faSms } from "@fortawesome/free-solid-svg-icons"; +import { UC_UI } from "../usercentrics/UsercentricsProvider"; declare global { interface Window { - UC_UI: UC_UI + UC_UI: UC_UI; } } const Footer = () => { const { modal, clickHandler } = useBookCallModal(); const socialListItems = Object.keys(companySocialProfiles).map((network: string) => { - return
  • - }) + return ( +
  • + +
  • + ); + }); const privacySettingsHandler: MouseEventHandler = (event) => { - event.preventDefault() + event.preventDefault(); if (window.UC_UI) { - window.UC_UI.showSecondLayer() + window.UC_UI.showSecondLayer(); } - } + }; return (
    -

    © {new Date().getFullYear()} LaunchWare. All rights reserved.

    +

    + © {new Date().getFullYear()} LaunchWare. All rights reserved. +

    - - ) -} + + ); +}; -export default Footer +export default Footer; diff --git a/apps/gatsby/src/components/layout/HeadDefaults.tsx b/apps/gatsby/src/components/layout/HeadDefaults.tsx index b746588..72c4bba 100644 --- a/apps/gatsby/src/components/layout/HeadDefaults.tsx +++ b/apps/gatsby/src/components/layout/HeadDefaults.tsx @@ -1,11 +1,18 @@ -import { Script } from "gatsby" -import React, { useEffect } from "react" -import { UsercentricsScript } from "../usercentrics/UsercentricsScript" +import { Script } from "gatsby"; +import React, { useEffect } from "react"; +import { UsercentricsScript } from "../usercentrics/UsercentricsScript"; export const HeadDefaults = () => { - return <> - - -