Skip to content

Tag: reactjs

Using maps over template literals

so I need to print a boolean value if the given string contains [[placeholder:var3]] but the var3 will be dynamically fed from an array as belwo: I tried using map around the template literals but it is throwing me an error also tried like above eg but it checks only first value of the array, so can someone p…

Error: animal.image.map is not a function

I am currently making a shelter web app using mern stack and i am struggling to display an image from my object. i already used the map but i think it is only for array objects. so i am clueless how to get the images.url on my animal object. this is my animalSchema AnimalReducer and this is what i use

How to check if a twilio token is expired

I have a nextjs project and I need to verify if a twilio token is expired or not. I thought about using the library jwt-decode to decode the token and take the exp attribute from it, then compare it to the actual date. The problem is that the exp date seems to be broken because it is always in 1970.