Skip to content

Commit de71208

Browse files
committed
fixed
1 parent 442a6f7 commit de71208

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

src/Components/ListItem.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

src/Views/Test.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@ const electron = window.require('electron')
1111
const path = electron.remote.require('path')
1212

1313
const 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

2728
const 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
}

0 commit comments

Comments
 (0)