mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-27 20:26:40 +00:00
7 lines
178 B
TypeScript
7 lines
178 B
TypeScript
import type { SyntheticEvent } from 'react';
|
|
|
|
export const handleEventPreventingDefault = <T>(handler: () => T) => (e: SyntheticEvent) => {
|
|
e.preventDefault();
|
|
handler();
|
|
};
|