@@ -15,10 +15,8 @@ export default function ExportButton() {
15
15
const state = useSelector ( ( store : RootState ) => store . appState ) ;
16
16
17
17
const genOptions : string [ ] = [
18
- 'Export components' ,
19
- 'Export components with application files'
18
+ 'Export components'
20
19
] ;
21
- let genOption = 0 ;
22
20
23
21
// Closes out the open modal
24
22
const closeModal = ( ) => setModal ( '' ) ;
@@ -29,7 +27,7 @@ export default function ExportButton() {
29
27
{ genOptions . map ( ( option : string , i : number ) => (
30
28
< ListItem
31
29
key = { i }
32
- onClick = { ( ) => chooseGenOptions ( i ) }
30
+ onClick = { ( ) => chooseGenOptions ( ) }
33
31
style = { {
34
32
border : '1px solid #3f51b5' ,
35
33
marginBottom : '2%' ,
@@ -39,32 +37,19 @@ export default function ExportButton() {
39
37
< ListItemText primary = { option } style = { { textAlign : 'center' } } />
40
38
</ ListItem >
41
39
) ) }
42
- < ListItem >
43
- < input type = "checkbox" id = "tests" name = "tests" > </ input >
44
- < label for = "tests" > Include Tests</ label >
45
- </ ListItem >
46
40
</ List >
47
41
) ;
48
- let testchecked = 0 ;
49
- // helper function called by showGenerateAppModal
50
- // this function will prompt the user to choose an app directory once they've chosen their export option
51
- const chooseGenOptions = ( genOpt : number ) => {
52
- // set export option: 0 --> export only components, 1 --> export full project
53
- genOption = genOpt ;
54
-
55
- //This is exclusive to the electron app
56
- // window.api.chooseAppDir();
57
- // testchecked = document.getElementById('tests').checked;
42
+
43
+ const chooseGenOptions = ( ) => {
58
44
zipFiles ( state ) ;
59
-
60
45
closeModal ( ) ;
61
46
} ;
62
47
63
48
setModal (
64
49
createModal ( {
65
50
closeModal,
66
51
children,
67
- message : 'Choose export preference :' ,
52
+ message : 'Click to download in zip file :' ,
68
53
primBtnLabel : null ,
69
54
primBtnAction : null ,
70
55
secBtnAction : null ,
@@ -100,17 +85,10 @@ export default function ExportButton() {
100
85
) ;
101
86
}
102
87
103
- //The below code is exclusive to the Electron App's export function
104
-
105
- // import React, { useState, useCallback, useEffect } from 'react';
106
- // import List from '@mui/material/List';
107
- // import ListItem from '@mui/material/ListItem';
108
- // import ListItemText from '@mui/material/ListItemText';
109
- // import GetAppIcon from '@mui/icons-material/GetApp';
110
- // import Button from '@mui/material/Button';
111
- // import exportProject from '../../utils/exportProject.util';
112
- // import createModal from './createModal';
113
- // import { useSelector } from 'react-redux';
88
+ //The below code is exclusive to ReacType's Electron App
89
+ //If you would like to deploy the app, please comment out the exportButton function above and uncomment the code below
90
+
91
+
114
92
// export default function ExportButton() {
115
93
// const [modal, setModal] = useState(null);
116
94
// const state = useSelector(store => store.appState)
0 commit comments