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

161
Views
div's background is different than it's content (same values passed)

Ok, so I have a very strange problem (I'm using next.js).

I'm mapping shuffled array.

const otherPoepleData = shuffle(allPeople).filter(item => item.full_slug !== data.full_slug).slice(0, 3)
{otherPoepleData.map((item, index) =>
  <SpeakerNew data={item} key={item.id} index={index} />
)}

To sum up the problem I've put inside SpeakerNew component following code:

<div style={{ backgroundImage: `url(${image.filename})` }}>
  {image.filename}
</div>

And here are the results:

<div style="background-image: 
  url(https://something.com/blablaba57674676343zzx.png);">
      https://something.com/blablaba13123123dasdzz.png
</div>

The content of the div is 100% correct, however the backgroundImage url is incorrect. Taken from completely other person from array I'm mapping. What coulde be the problem here?

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!