Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
static show = (pattern) => {
UIEvents.emit(ProgressBar.PROGRESS_BAR_SHOW, pattern);
}
handleDidClose = () => {
UIEvents.emit(SHEET_EVENTS.CLOSE);
};
useEffect(() => {
if (modal && !ref.current) {
ref.current = true;
UIEvents.emit(MODAL_EVENTS.SHOW);
}
if (!modal && ref.current) {
ref.current = false;
UIEvents.emit(MODAL_EVENTS.HIDE);
}
}, [modal]);
static hide = (pattern) => {
UIEvents.emit(ProgressBar.PROGRESS_BAR_HIDE, pattern);
}
useEffect(() => {
if (modal && !ref.current) {
ref.current = true;
UIEvents.emit(MODAL_EVENTS.SHOW);
}
if (!modal && ref.current) {
ref.current = false;
UIEvents.emit(MODAL_EVENTS.HIDE);
}
}, [modal]);
handleDidOpen = () => {
UIEvents.emit(SHEET_EVENTS.OPEN);
this.props.onDidOpen();
};