From 87ca3bc12fc7fb0996d2f2cd8edde0238936ad4c Mon Sep 17 00:00:00 2001 From: abhrajitray77 Date: Tue, 5 Aug 2025 13:27:09 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=A7cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/src/components/Hero.tsx | 52 ------------------------------------- 1 file changed, 52 deletions(-) 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 */}