Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { log } from "@core/utility";
import EmojiButton from "./EmojiButton";
import * as Icons from "./Icons";
import Popover from "./Generic/Popover";
import { withEditor, editorContextTypes } from "./ContextProvider";
const buttonSize = 39;
const colSize = 7;
const rowSize = 7;
const rowIndexesByGroupId = {};
const cellIndexesByGroupId = {};
/**
* Get start positions for each category
*/
emojis.map((data, key) => {
const groupID = data.group;
if (!(groupID in rowIndexesByGroupId)) {
rowIndexesByGroupId[groupID] = Math.floor(key / colSize);
cellIndexesByGroupId[groupID] = key;
}
});
log("rowIndexesByGroupId: ", rowIndexesByGroupId);
export class EmojiPopover extends React.PureComponent {
static propTypes = {
...editorContextTypes,
isVisible: PropTypes.bool.isRequired,
closeMenu: PropTypes.func.isRequired,
blurHandler: PropTypes.func.isRequired,
popoverTitleID: PropTypes.string.isRequired,