- complete onyx design template

- implement public sharable urls
- implement more actions
This commit is contained in:
Amruth Pillai
2020-07-11 20:42:16 +05:30
parent 0b5653fab5
commit 5ec1f21bd3
55 changed files with 1025 additions and 412 deletions

View File

@ -1,14 +1,12 @@
import { get } from 'lodash';
import { get, isEmpty } from 'lodash';
import moment from 'moment';
export const getModalText = (isEditMode, type) => {
return isEditMode ? `Edit ${type}` : `Add ${type}`;
};
export const transformCollectionSnapshot = (snapshot, setData) => {
const data = [];
snapshot.forEach((doc) => data.push(doc.data()));
setData(data);
export const safetyCheck = (section, path = 'items') => {
return !!(section && section.visible === true && !isEmpty(section[path]));
};
export const handleKeyUp = (event, action) => {