feat: Add Integration hooks UI (#2301)

This commit is contained in:
Muhsin Keloth 2021-06-06 16:59:05 +05:30 committed by GitHub
parent c6487877bf
commit 14b51e108a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 1108 additions and 31 deletions

View file

@ -13,6 +13,18 @@ export default () => {
}
};
export const isEmptyObject = obj =>
Object.keys(obj).length === 0 && obj.constructor === Object;
export const isJSONValid = value => {
try {
JSON.parse(value);
} catch (e) {
return false;
}
return true;
};
export const getTypingUsersText = (users = []) => {
const count = users.length;
if (count === 1) {