import React, {useCallback, useEffect, useState} from 'react'; import {continueRender, delayRender} from 'remotion'; import GsapAnimation from './GsapAnimation'; import gsap from 'gsap'; export default function SvgMaker(props) { const [svgData, setSvgPath] = useState(null); const [handle] = useState(() => delayRender()); const fetchData = useCallback(async () => { try { const response = await fetch( 'https://yakova-svg.hf.space/generateSVGPath', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ text: props.text, size: 150, separate: true, strokeWidth:props.strokeWidth, fill: props.fill, individualLetters: true, stroke: 'black', fontUrl: 'https://bla-tranny.hf.space/stream/?id=131', }), } ); if (!response.ok) { throw new Error('Network response was not ok'); } const data = await response.json(); setSvgPath(data); continueRender(handle); } catch (error) { console.error('Error fetching data:', error); } }, []); useEffect(() => { fetchData(); }, []); return (