Partial Progress with rewriting parts of Song.js

Also started work on Writing Storage.js

Storage.js manages info across sessions of melodii
This commit is contained in:
Paoda
2019-03-22 22:01:44 -07:00
parent dd58f5512f
commit 152ef58e41
6 changed files with 230 additions and 17 deletions

View File

@@ -152,7 +152,7 @@ export default class Body extends React.Component {
term = parseInt(term, 10);
temp.tbody = table.tbody.filter(obj => obj.year === term);
} else {
// type == time
// type === time
term = term.toLowerCase();
temp.tbody = table.tbody.filter(obj =>
obj.time.toLowerCase().includes(term)

View File

@@ -262,7 +262,7 @@ export function sortTable(table, term) {
return a.year - b.year;
});
} else if (term === "time") {
//term == time convert the time into seconds
//term === time convert the time into seconds
//The messy else if + else is becomes a.inSeconds || b.inSeconds can be undefined.
tbody.sort((a, b) => {
if (a.inSeconds && b.inSeconds) {