refactoring and implementing refreshing items list every 2 seconds

This commit is contained in:
egradanin
2019-01-14 22:41:53 +01:00
parent a431c58763
commit ae446d5333
19 changed files with 166 additions and 154 deletions

View File

@@ -0,0 +1,11 @@
export const hoc = (option, componentList) => componentList[option] || null;
export const areObjectEqual = function checkEquality(objectA, objectB) {
return (
Object.keys(objectA).length === Object.keys(objectB).length &&
Object.keys(objectA).every(property =>
objectA[property] === Object(objectA[property])
? checkEquality(objectA[property], objectB[property])
: objectA[property] === objectB[property]
)
);
};