From 9689df39ccc63b7c52969b0d60286bbac96dacf2 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 03:29:26 +0000 Subject: [PATCH 1/2] Update src/app/page.tsx --- src/app/page.tsx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index d60dcef..03b720d 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -19,7 +19,7 @@ export default function LandingPage() { borderRadius="pill" contentWidth="compact" sizing="largeSmallSizeMediumTitles" - background="blurBottom" + background="circleGradient" cardStyle="gradient-mesh" primaryButtonStyle="shadow" secondaryButtonStyle="radial-glow" @@ -43,7 +43,7 @@ export default function LandingPage() { Date: Wed, 11 Mar 2026 03:29:27 +0000 Subject: [PATCH 2/2] Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx --- .../shared/SvgTextLogo/SvgTextLogo.tsx | 81 +++++++++++-------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..5991d0d 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,64 @@ -"use client"; - -import { memo } from "react"; -import useSvgTextLogo from "./useSvgTextLogo"; -import { cls } from "@/lib/utils"; +import React, { useMemo } from 'react'; interface SvgTextLogoProps { - logoText: string; - adjustHeightFactor?: number; - verticalAlign?: "top" | "center"; + text: string; + fontSize?: number; + fontFamily?: string; + fill?: string; + strokeWidth?: number; + stroke?: string; className?: string; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +const SvgTextLogo: React.FC = ({ + text, + fontSize = 48, + fontFamily = 'Arial, sans-serif', + fill = 'currentColor', + strokeWidth = 0, + stroke = 'none', + className = '', +}) => { + const textDimensions = useMemo(() => { + const canvas = document.createElement('canvas'); + const ctx = canvas.getContext('2d'); + if (!ctx) return { width: 100, height: fontSize }; + + ctx.font = `${fontSize}px ${fontFamily}`; + const metrics = ctx.measureText(text); + return { + width: metrics.width, + height: fontSize, + }; + }, [text, fontSize, fontFamily]); + + const padding = 10; + const svgWidth = textDimensions.width + padding * 2; + const svgHeight = textDimensions.height + padding * 2; return ( - {logoText} + {text} ); -}); - -SvgTextLogo.displayName = "SvgTextLogo"; +}; export default SvgTextLogo; -- 2.49.1