From e5cf6ee36200d8abedf7c43282e574b3c2a369e5 Mon Sep 17 00:00:00 2001 From: sasha-astiadi Date: Wed, 12 Nov 2025 16:26:51 +0100 Subject: [PATCH] refactor: remove unused imports and variables - Removed unused React imports from components (now using named imports only) - Removed unused cursor state and onMouseMove handler from text-hover-effect - Removed unused H1 import from HomeBlink --- src/components/HomeHeadline.tsx | 1 - src/components/ui/text-hover-effect.tsx | 8 +++----- src/pages/home/HomeBlink.tsx | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/HomeHeadline.tsx b/src/components/HomeHeadline.tsx index 8edefa7..f15dcfa 100644 --- a/src/components/HomeHeadline.tsx +++ b/src/components/HomeHeadline.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { TextHoverEffect } from "@/components/ui/text-hover-effect"; export function HomeHeadline() { diff --git a/src/components/ui/text-hover-effect.tsx b/src/components/ui/text-hover-effect.tsx index f69db5d..c462571 100644 --- a/src/components/ui/text-hover-effect.tsx +++ b/src/components/ui/text-hover-effect.tsx @@ -1,5 +1,5 @@ "use client"; -import React, { useRef, useEffect, useState } from "react"; +import { useRef, useEffect, useState } from "react"; import { motion, useAnimation } from "motion/react"; export const TextHoverEffect = ({ @@ -11,8 +11,7 @@ export const TextHoverEffect = ({ }) => { const svgRef = useRef(null); const controls = useAnimation(); - const [cursor, setCursor] = useState({ x: 0, y: 0 }); - const [hovered, setHovered] = useState(false); + const [hovered, setHovered] = useState(false); // ✅ Animate mask looping automatically useEffect(() => { @@ -41,8 +40,7 @@ export const TextHoverEffect = ({ xmlns="http://www.w3.org/2000/svg" onMouseEnter={() => setHovered(true)} onMouseLeave={() => setHovered(false)} - onMouseMove={(e) => setCursor({ x: e.clientX, y: e.clientY })} - className="select-none" + className="select-none" > {/* ✅ Softer cyan gradient */} diff --git a/src/pages/home/HomeBlink.tsx b/src/pages/home/HomeBlink.tsx index cfacd68..ee84bc0 100644 --- a/src/pages/home/HomeBlink.tsx +++ b/src/pages/home/HomeBlink.tsx @@ -2,7 +2,7 @@ import { Button } from "@/components/Button"; import { Spotlight } from "@/components/ui/spotlight"; -import { H1, H4, H5 } from "@/components/Texts"; +import { H4, H5 } from "@/components/Texts"; import { HomeHeadline } from "@/components/HomeHeadline"; export function HomeBlink({ onGetStartedClick }: { onGetStartedClick: () => void }) {