1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2025-06-16 13:46:16 +02:00

Fix lint.

This commit is contained in:
Bogdan Bodnar
2019-08-27 16:09:18 +02:00
parent 18e8e20206
commit c0d742b13b
36 changed files with 620 additions and 831 deletions

View File

@ -9,7 +9,7 @@ import { useCallback, useEffect, useReducer } from "react";
import update from "immutability-helper";
import { useAPIGet } from "api/hooks";
import { useWSForisModule } from "webSockets/hooks";
import useWSForisModule from "webSockets/hooks";
const FORM_ACTIONS = {
@ -18,7 +18,6 @@ const FORM_ACTIONS = {
};
export function useForm(validator, prepData) {
const [state, dispatch] = useReducer(formReducer, {
data: null,
initialData: null,
@ -82,7 +81,7 @@ function getChangedValue(target) {
value = target.checked;
} else if (target.type === "number") {
const parsedValue = parseInt(value);
value = isNaN(parsedValue) ? value : parsedValue;
value = Number.isNaN(parsedValue) ? value : parsedValue;
}
return value;
}