From ff31f8110b9a2b79e127509d9b40f58aeda97cd1 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Mar 2026 09:01:20 +0000 Subject: [PATCH] Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx --- .../shared/SvgTextLogo/SvgTextLogo.tsx | 86 +++++++++++-------- 1 file changed, 50 insertions(+), 36 deletions(-) diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..2772b3e 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,65 @@ -"use client"; - -import { memo } from "react"; -import useSvgTextLogo from "./useSvgTextLogo"; -import { cls } from "@/lib/utils"; +import React, { useState, useEffect } from 'react'; interface SvgTextLogoProps { - logoText: string; - adjustHeightFactor?: number; - verticalAlign?: "top" | "center"; + text: string; + width?: number; + height?: number; + fontSize?: number; + fontWeight?: number; + fill?: string; + fontFamily?: string; + letterSpacing?: number; + textAnchor?: 'start' | 'middle' | 'end'; + dominantBaseline?: 'auto' | 'baseline' | 'middle' | 'central' | 'hanging'; className?: string; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +export const SvgTextLogo: React.FC = ({ + text, + width = 300, + height = 100, + fontSize = 48, + fontWeight = 700, + fill = '#000000', + fontFamily = 'Arial, sans-serif', + letterSpacing = 0, + textAnchor = 'middle', + dominantBaseline = 'central', + className = '', +}) => { + const [isMounted, setIsMounted] = useState(false); + + useEffect(() => { + setIsMounted(true); + }, []); + + if (!isMounted) { + return null; + } return ( - {logoText} + {text} ); -}); +}; -SvgTextLogo.displayName = "SvgTextLogo"; - -export default SvgTextLogo; +export default SvgTextLogo; \ No newline at end of file