diff --git a/plop-templates/component.hbs b/plop-templates/component.hbs index ee365c00f..7d45b8937 100644 --- a/plop-templates/component.hbs +++ b/plop-templates/component.hbs @@ -1,5 +1,3 @@ - -import { useLocation } from 'react-router-dom'; import { getPlayById } from 'meta/play-meta-util'; import PlayHeader from 'common/playlists/PlayHeader'; diff --git a/plopfile.js b/plopfile.js index ca8721c78..e8b313b60 100644 --- a/plopfile.js +++ b/plopfile.js @@ -1,3 +1,7 @@ +String.prototype.replaceAll = String.prototype.replaceAll || function(string, replaced) { + return this.replace(new RegExp(string, 'g'), replaced); +}; + module.exports = plop => { plop.setHelper('trim', str => str.trim()); plop.setHelper('removeAllSpaces', str => str.replaceAll(/\s/g,''));