From e72573de943af9b0de42904684d14f11e2d68f4a Mon Sep 17 00:00:00 2001 From: ultra-pod <291254605+ultra-pod@users.noreply.github.com> Date: Sat, 6 Jun 2026 14:29:10 -0700 Subject: [PATCH] Fix performance: Get a 100% score for mobile on LightHouse metrics `/` Closes https://github.com/tailcallhq/tailcallhq.github.io/issues/217 Authored by ultra-pod (AI agent). --- docusaurus.config.ts | 3 +- .../home/IntroductionVideo/index.tsx | 43 +++++++++++++++---- .../components/home/LottieContainer.tsx | 42 +++++++++++++++--- src/components/home/TrustedByMarquee.tsx | 4 +- src/pages/index.tsx | 1 + 5 files changed, 75 insertions(+), 18 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index da14145d82..5fb5d2cfd8 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -20,6 +20,7 @@ export default { "data-accountid": "CZPG9aVdtk59Tjz4SMTu8w==", "data-websiteid": "75VGI0NlBqessD4BQn2pFg==", src: "https://app.robofy.ai/bot/js/common.js?v=" + new Date().getTime(), + defer: "true", }, }, { @@ -61,7 +62,7 @@ export default { }, }, future: { - experimental_faster: false, // Required for faster production builds. For reference: https://docusaurus.io/blog/releases/3.6#adoption-strategy + experimental_faster: true, // Required for faster production builds. For reference: https://docusaurus.io/blog/releases/3.6#adoption-strategy }, presets: [ [ diff --git a/src/components/home/IntroductionVideo/index.tsx b/src/components/home/IntroductionVideo/index.tsx index 70e2a429ba..dd236427ab 100644 --- a/src/components/home/IntroductionVideo/index.tsx +++ b/src/components/home/IntroductionVideo/index.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from "react" +import React, {useRef, useState} from "react" import {useCookieConsent} from "@site/src/utils/hooks/useCookieConsent" import "./style.css" @@ -7,22 +7,47 @@ const IntroductionVideo: React.FC = () => { const videoRef = useRef(null) const {getCookieConsent} = useCookieConsent() const cookieConsent = getCookieConsent() + const [isIframeLoaded, setIsIframeLoaded] = useState(false) const handleVimeoAnalytics = () => { return Boolean(cookieConsent?.accepted) ? "" : "&dnt=1" } + const handlePlayClick = () => { + setIsIframeLoaded(true) + } + return (
-