import React, {useState, useEffect} from 'react'; export const LoadingTeamsForm = (): JSX.Element => { const [user, setUser] = useState(0); useEffect(() => { fetch('/api/loadingLegisteredCommands', { method: 'POST'}) .then(res => res.json()) .then(json => setUser(json)) },[1]); console.log(user) return ( <> {user.map((rows) => { } )}
Название команды Учебное заведение ФИО участников Класс
{rows.team_name} {rows.training_institution_team} Иван, Петр, Дмитрий 1
); }; export default LoadingTeamsForm;