diff --git a/www/src/components/Hero.tsx b/www/src/components/Hero.tsx index d6942d4..291ab6b 100644 --- a/www/src/components/Hero.tsx +++ b/www/src/components/Hero.tsx @@ -1,62 +1,10 @@ -import React, { useRef, useEffect } from "react"; import { Button } from "./ui/button"; import { ArrowRight, Shield, RefreshCw } from "lucide-react"; import { GitHubLogoIcon } from "@radix-ui/react-icons"; import Spline from "@splinetool/react-spline"; export function Hero() { - const splineRef = useRef(null); - function onLoad(spline: any) { - splineRef.current = spline; - - // - try multiple selectors - const remove = () => { - // Try the spline-viewer element - const viewer = document.querySelector("spline-viewer"); - if (viewer && (viewer as any).shadowRoot) { - // Try different selectors - const selectors = [ - "#logo", - ".logo", - '[id*="logo"]', - '[class*="logo"]', - 'a[href*="spline"]', - ]; - - selectors.forEach((selector) => { - const element = (viewer as any).shadowRoot.querySelector(selector); - }); - - // Also check for any links containing "Built with Spline" - const allElements = (viewer as any).shadowRoot.querySelectorAll("*"); - allElements.forEach((el: any) => { - if (el.textContent && el.textContent.includes("Built with Spline")) { - el.remove(); - console.log('Removed element containing "Built with Spline"'); - } - }); - } - }; - - // Try removing at different intervals to catch dynamically added elements - setTimeout(remove, 100); - setTimeout(remove, 500); - setTimeout(remove, 1000); - setTimeout(remove, 2000); - } - - - useEffect(() => { - // Ensure the Spline scene is loaded before trying to remove - const interval = setInterval(() => { - if (splineRef.current && splineRef.current.spline) { - onLoad(Spline); - clearInterval(interval); - } - }, 100); - return () => clearInterval(interval); - }, []); return (
{/* Elegant gradient background */}