React: inline background image style not showing even though all conditions are met


Hello, I am trying to display an image dynamically, and it is not working. The images are sourced locally in the public folder. When I inspect the page on the web, the path of the image shows (I console.log it).

I have used this format for other components in this project, and it works perfectly. I have no clue what the problem is. I need help!!!
Thanks

Mind giving us the actually code ? instead of just a screenshot?