Skip to content

Commit 63b6ed4

Browse files
author
Julia Bakerink
committed
Fixed issue where export component functionality in nav bar was triggering export project functionality. Issue was due to methods in files having the same name
1 parent 387f044 commit 63b6ed4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/ExportComponentMixin.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<script>
22
export default {
33
methods: {
4-
showExportDialog() {
4+
showExportComponentDialog() {
55
ipcRenderer
66
.invoke("exportComponent", {
77
title: "Choose location to save folder in",
88
message: "Choose location to save folder in",
99
nameFieldLabel: "Component Name",
1010
})
11-
.then((result) => this.exportFile(result.filePath))
11+
.then((result) => this.exportComponentFile(result.filePath))
1212
.catch((err) => console.log(err));
1313
},
1414
/**
@@ -196,7 +196,7 @@ export default {
196196
return `\n\n<style scoped>\n</style>`;
197197
},
198198
199-
exportFile(data) {
199+
exportComponentFile(data) {
200200
if (data === undefined) return;
201201
if (!fs.existsSync(data)) {
202202
fs.mkdirSync(data);
@@ -212,7 +212,7 @@ export default {
212212
},
213213
// OVERVUE 6.0: export active component
214214
handleExportComponent(event) {
215-
this.showExportDialog();
215+
this.showExportComponentDialog();
216216
},
217217
},
218218
};

src/components/file_system_interface/ExportProject.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
name: "ExportProjectComponent",
3232
mixins: [handleExportComponentMixin],
3333
methods: {
34-
showExportDialog() {
34+
showExportProjectDialog() {
3535
ipcRenderer
3636
.invoke("exportProject", {
3737
title: "Choose location to save folder in",
@@ -42,7 +42,7 @@ export default {
4242
.catch((err) => console.log(err));
4343
},
4444
exportProject: function () {
45-
this.showExportDialog();
45+
this.showExportProjectDialog();
4646
},
4747
/**
4848
* @description creates the router.js file
@@ -504,7 +504,7 @@ export default {
504504
},
505505
},
506506
computed: {
507-
...mapState(["componentMap", "imagePath", "routes", "exportAsTypescript"]),
507+
...mapState(["componentMap", "imagePath", "routes", "exportAsTypescript", "activeComponent"]),
508508
},
509509
};
510510
</script>

0 commit comments

Comments
 (0)