diff --git a/src/app/page.tsx b/src/app/page.tsx index abcc108..e99be9c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -44,7 +44,7 @@ export default function LandingPage() { (function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +export const SvgTextLogo: React.FC = ({ + text, + className = '', + textClassName = '', + fontSize = 48, + fontFamily = 'system-ui, -apple-system, sans-serif', + fontWeight = 700, + letterSpacing = 0, + fill = 'currentColor', +}) => { + const textRef = useRef(null); + const svgRef = useRef(null); + + useEffect(() => { + if (textRef.current && svgRef.current) { + const bbox = textRef.current.getBBox(); + svgRef.current.setAttribute('viewBox', `${bbox.x - 10} ${bbox.y - 10} ${bbox.width + 20} ${bbox.height + 20}`); + } + }, [text]); return ( - {logoText} + {text} ); -}); +}; -SvgTextLogo.displayName = "SvgTextLogo"; - -export default SvgTextLogo; +export default SvgTextLogo; \ No newline at end of file