import React, { useState, useEffect} from 'react'; import { Container, Grid, Header, List, Segment, Label, } from 'semantic-ui-react'; import { Item } from 'semantic-ui-react'; import 'semantic-ui-css/semantic.min.css'; import AudioPlayer from 'react-h5-audio-player'; type Props = { id: number; audio: string; description: string; urlImg: string; title: string; children: Node; } const PodcastBlocks: React.FC = ({id, audio, description, urlImg, title}) => ( <> {title} {description} console.log(id)} // other props here /> ) export default function Home() { interface IUser { [x: string]: any; name: string; }; const [data, setData] = useState(); const [isLoading, setLoading] = useState(false) useEffect(() => { setLoading(true) fetch('/api/podcasts/all') .then((res) => res.json()) .then((data) => { setData(data); setLoading(false); }) }, []) if (isLoading) return

Загрузка...

if (!data) return

Нет интернета

const podcasts = data.map((obj: JSX.IntrinsicAttributes & Props, index: React.Key | null | undefined) => ); return ( <>
BlogBaster
Увлечены. Качественно. За новое звучание.

Если вы хотите стать нашим партнером или рекламодателем — пишите на podcast@blogbaster.xyz

{podcasts}
Вконтакте Telegram
Яндекс музыка Google подкасты Apple подкасты
О нас

BlogBaster 2022

) }