refactoring and implementing refreshing items list every 2 seconds
This commit is contained in:
11
frontend-react/src/utils/helpers.js
Normal file
11
frontend-react/src/utils/helpers.js
Normal 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]
|
||||
)
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user