JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "create-event-handler.ts"

Full Path: /home/markqprx/iniasli.pro/client/utils/dom/create-event-handler.ts
File size: 335 bytes
MIME-type: text/plain
Charset: utf-8

import {EventHandler, SyntheticEvent} from 'react';

export function createEventHandler(handler?: EventHandler<SyntheticEvent>) {
  if (!handler) return handler;

  return (e: SyntheticEvent) => {
    // ignore events bubbling up from portals
    if (e.currentTarget.contains(e.target as HTMLElement)) {
      handler(e);
    }
  };
}