Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

90
Views
my image doesn't display on screen when i try to get it from api

i am trying to get an image from api and display it to screen i recieve the addrees and set it to state when i log the state it is null this is my code

useEffect(() => {
    baseUrl
      .get(`/api/v1/questions/${id}/edit`)
      .then((response) => {
        setLoading(false);
        const data = response.data.data.data;
        console.log(data);
    
        setImageUrlQuestion(`https://panel.farostaha.com${data.question}`);
        console.log(`https://panel.farostaha.com${data.question}`);
        console.log(imageUrlQuestion);

        setImageUrlAnswer(`https://panel.farostaha.com${data.answer}`);
        setSelectedBookOption({ value: data.book.id, label: data.book.name });
        setSelectedSubjectOption({
          value: data.subject.id,
          label: data.subject.name,
        });


other parts works correctly but the images in the state are null

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!