File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed
Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ function ListItem(props) {
6868 const deleteMenuItem = ( ) => { // function that handles deleting items
6969
7070 if ( props . type === "List" ) {
71- let split = props . path . split ( "-" )
71+ let split = itemPath . split ( "-" )
72+ console . log ( split )
7273 let pth = path . join ( dataFolder , split . join ( "/" ) )
7374 fs . unlink ( pth , ( err ) => { // delete the file with path "pth"
7475 if ( err ) throw err
Original file line number Diff line number Diff line change @@ -11,17 +11,18 @@ const electron = window.require('electron')
1111const path = electron . remote . require ( 'path' )
1212
1313const timeLimits = {
14- "slow" : 20 ,
15- "medium" : 15 ,
16- "fast" : 10 ,
17- "eat_my_dust" : 5
18- }
19-
20- const timeLimitsMulti = {
21- "slow" : 20 ,
22- "medium" : 15 ,
23- "fast" : 10 ,
24- "eat_my_dust" : 5
14+ "text" : {
15+ "slow" : 20 ,
16+ "medium" : 15 ,
17+ "fast" : 10 ,
18+ "eat_my_dust" : 5
19+ } ,
20+ "multi" : {
21+ "slow" : 15 ,
22+ "medium" : 10 ,
23+ "fast" : 5 ,
24+ "eat_my_dust" : 3
25+ }
2526}
2627
2728const dataFolder = path . join ( electron . remote . app . getPath ( 'userData' ) , "./Data" )
@@ -107,7 +108,7 @@ function Test(props) {
107108 if ( queryStr [ "speed" ] !== 1 ) {
108109 setTime ( time + 1 )
109110
110- if ( time >= timeLimits [ queryStr [ "speed" ] ] && ! continueDialog ) {
111+ if ( time >= timeLimits [ questions [ questionIndex ] [ "TYPE" ] ] [ queryStr [ "speed" ] ] && ! continueDialog ) {
111112 setTimeDialog ( true )
112113 }
113114 }
You can’t perform that action at this time.
0 commit comments