diff --git a/src/components/Inputs/Link.tsx b/src/components/Inputs/Link.tsx index 8898229..0f35f14 100644 --- a/src/components/Inputs/Link.tsx +++ b/src/components/Inputs/Link.tsx @@ -1,5 +1,5 @@ import router from "next/router"; -import { PointerEventHandler, useState } from "react"; +import { MouseEventHandler, useState } from "react"; import { isDefined } from "helpers/others"; interface Props { @@ -8,7 +8,7 @@ interface Props { allowNewTab?: boolean; alwaysNewTab?: boolean; children: React.ReactNode; - onClick?: PointerEventHandler; + onClick?: MouseEventHandler; onFocusChanged?: (isFocused: boolean) => void; disabled?: boolean; } @@ -28,19 +28,19 @@ export const Link = ({ return (
{ + onMouseLeave={() => { setIsValidClick(false); onFocusChanged?.(false); }} onContextMenu={(event) => event.preventDefault()} - onPointerDown={(event) => { + onMouseDown={(event) => { if (!disabled) { event.preventDefault(); onFocusChanged?.(true); setIsValidClick(true); } }} - onPointerUp={(event) => { + onMouseUp={(event) => { onFocusChanged?.(false); if (!disabled) { if (isDefined(onClick)) {