feat: Support in Workbench for loading config from gist
This commit is contained in:
parent
8c2a61fdca
commit
a7e3cd4623
41 changed files with 299 additions and 7 deletions
|
@ -16,11 +16,18 @@ 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="en"
|
||||
recreate={recreate}
|
||||
//translations={translations}
|
||||
/>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue