Fixed the following code smells:

1) useState call is not destructured into value + setter pair.
2) A fragment with only one child is redundant.
3) Unnecessary '.apply()' and '.call()'.
4) Expected the Promise rejection reason to be an Error.
This commit is contained in:
Akshay Joshi
2024-04-09 19:18:56 +05:30
parent ed2a73f7ff
commit 30d2d1b23e
51 changed files with 486 additions and 511 deletions

View File

@@ -43,7 +43,7 @@ function fetch_ticket_lifetime () {
if (ticket_lifetime > 0) {
return Promise.resolve(ticket_lifetime);
} else {
return Promise.reject();
return Promise.reject(new Error(null));
}
});