From 9ce42595ae8b7afb763e8f1c014bb2a500c7f796 Mon Sep 17 00:00:00 2001 From: bender Date: Tue, 10 Mar 2026 20:03:40 +0000 Subject: [PATCH 1/2] Update src/app/page.tsx --- src/app/page.tsx | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index af19120..c26e593 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -20,7 +20,7 @@ export default function LandingPage() { borderRadius="soft" contentWidth="compact" sizing="largeSmall" - background="floatingGradient" + background="circleGradient" cardStyle="gradient-bordered" primaryButtonStyle="primary-glow" secondaryButtonStyle="radial-glow" @@ -45,13 +45,13 @@ export default function LandingPage() { Date: Tue, 10 Mar 2026 20:03:41 +0000 Subject: [PATCH 2/2] Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx --- .../shared/SvgTextLogo/SvgTextLogo.tsx | 83 +++++++++++-------- 1 file changed, 48 insertions(+), 35 deletions(-) diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..d33f8a6 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 from 'react'; interface SvgTextLogoProps { - logoText: string; - adjustHeightFactor?: number; - verticalAlign?: "top" | "center"; + text: string; + fontSize?: number; + fontWeight?: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold'; 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, + fontWeight = 'bold', + className = '', +}) => { + const fontWeightMap = { + light: 300, + normal: 400, + medium: 500, + semibold: 600, + bold: 700, + extrabold: 800, + }; + + const measureText = (textToMeasure: string): number => { + if (typeof window === 'undefined') return textToMeasure.length * fontSize * 0.6; + + const canvas = document.createElement('canvas'); + const ctx = canvas.getContext('2d'); + if (!ctx) return textToMeasure.length * fontSize * 0.6; + + ctx.font = `${fontWeightMap[fontWeight]} ${fontSize}px -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif`; + return ctx.measureText(textToMeasure).width; + }; + + const textWidth = measureText(text); + const svgWidth = textWidth + 40; + const svgHeight = fontSize + 20; return ( - {logoText} + {text} ); -}); - -SvgTextLogo.displayName = "SvgTextLogo"; +}; export default SvgTextLogo;