const uploadVideo = async (e) => {
setVideoUrl("http://localhost:3000/video");
};
useEffect(() => {
if (!userLocation) return;
getData({ lodaing: true, data: appState.data })
const API = '***'
const url = `https://api.openweathermap.org/data/2.5/weather?lat=${userLocation.lat}&lon=${userLocation.lon}&appid=${API}&units=metric`
fetch(url)
.then(res => res.json())
.then(res => {
console.log(res)
getData({
loading: false,
data: {
name: res.name,
country: res.sys.country,
temp: res.main.temp,
humidity: res.main.humidity,
speed: res.wind.speed,
},
})
})
}, [userLocation])
useEffect(() => {
// ...
}, [getData])
useEffect(() => {
if (!appState) return;
// ...
}, [appState])
window.addEventListener("DOMContentLoaded", () => {
formPay();
});
Можно просто прочитать на клиенте текст из Blob - ссылка на доку