Extract admin dashboard from ghabilee-frontend2 into a dedicated Next.js app for backoffice.ghabilee.ir (no SEO indexing / Clarity).
14 lines
487 B
TypeScript
14 lines
487 B
TypeScript
import type { MouseEvent as ReactMouseEvent } from 'react'
|
|
|
|
/**
|
|
* True for a normal primary click that should open an in-page overlay.
|
|
* Modifier / non-primary clicks keep native link behavior (new tab, etc.).
|
|
*/
|
|
export const isPlainPrimaryClick = (event: ReactMouseEvent | MouseEvent): boolean => {
|
|
if (event.defaultPrevented) return false
|
|
if (event.button !== 0) return false
|
|
if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return false
|
|
|
|
return true
|
|
}
|