path.helper.js 176 B

12345
  1. export const createImgPath = imgName => {
  2. return (imgName.endsWith('.jpg') || imgName.endsWith('.png') || imgName.endsWith('.jpeg'))?
  3. `img/${imgName}` :
  4. imgName;
  5. };