Merge version_1 into main #4
@@ -22,10 +22,10 @@ const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
||||
useEffect(() => {
|
||||
if (!svgRef.current || !animate) return;
|
||||
|
||||
const textElement = svgRef.current.querySelector('text');
|
||||
const textElement = svgRef.current.querySelector('text') as SVGTextPathElement | null;
|
||||
if (!textElement) return;
|
||||
|
||||
const length = textElement.getTotalLength();
|
||||
const length = (textElement as any).getTotalLength?.() ?? 0;
|
||||
textElement.setAttribute('stroke-dasharray', String(length));
|
||||
textElement.setAttribute('stroke-dashoffset', String(length));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user