1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-28 17:20:13 +02:00

add templates for file mode

This commit is contained in:
Kushagra Gour
2019-03-15 16:30:16 +05:30
parent e39e284705
commit 6724b7c90b
6 changed files with 87 additions and 13 deletions

View File

@@ -1368,8 +1368,8 @@ export default class App extends Component {
});
}
templateSelectHandler(template) {
fetch(`templates/template-${template.id}.json`)
templateSelectHandler(template, isFileMode) {
fetch(`templates/template-${isFileMode ? 'files-' : ''}${template.id}.json`)
.then(res => res.json())
.then(json => {
this.forkItem(json);