const fetchTrainingQueue = () => { const requestOptions = { method: 'GET', headers: { "Content-Type": "application/json", "Authorization": `Bearer ${props.jwt}` }, }; fetch('https://api.ai-server.becode.org/get_user_training_queue', requestOptions) .then(response => response.json()) .then(data => { setTrainingQueue(data) }) }