1
0
Fork 0

feat: Support in Workbench for loading config from gist

This commit is contained in:
Joost De Cock 2020-11-15 17:30:56 +01:00
parent 8c2a61fdca
commit a7e3cd4623
41 changed files with 299 additions and 7 deletions

View file

@ -16,11 +16,19 @@ const App = (props) => {
}
*/
// Adds support for loading an external pattern configuration
let recreate
if (window) recreate = window.location.pathname.substr(1).split('/')
if (recreate.length === 3 && recreate[0] === 'from')
recreate = { from: recreate[1], id: recreate[2] }
else recreate = false
return (
<Workbench
freesewing={freesewing}
Pattern={Pattern}
userLanguage="{{language}}"
recreate={recreate}
//translations={translations}
/>
)