diff --git a/src/app/page.tsx b/src/app/page.tsx index 6d9cdbf..4815b4a 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -21,7 +21,7 @@ export default function LandingPage() { borderRadius="pill" contentWidth="mediumLarge" sizing="largeSmallSizeMediumTitles" - background="noise" + background="circleGradient" cardStyle="inset" primaryButtonStyle="primary-glow" secondaryButtonStyle="radial-glow" @@ -44,7 +44,7 @@ export default function LandingPage() { { + text: string; + fontSize?: number; + fontFamily?: string; + fontWeight?: string | number; + letterSpacing?: number; className?: string; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +const SvgTextLogo = React.forwardRef( + ( + { + text, + fontSize = 32, + fontFamily = 'system-ui, -apple-system, sans-serif', + fontWeight = 'bold', + letterSpacing = 0, + className = '', + ...props + }, + ref + ) => { + const textElement = React.useRef(null); + const [bbox, setBbox] = React.useState({ width: 0, height: 0 }); - return ( - - { + if (textElement.current) { + try { + const bounds = textElement.current.getBBox(); + setBbox({ + width: bounds.width + 20, + height: bounds.height + 20, + }); + } catch (e) { + // Handle error silently + } + } + }, [text]); + + return ( + - {logoText} - - - ); -}); + + {text} + + + ); + } +); -SvgTextLogo.displayName = "SvgTextLogo"; +SvgTextLogo.displayName = 'SvgTextLogo'; -export default SvgTextLogo; +export default SvgTextLogo; \ No newline at end of file