Skip to content

Commit

Permalink
feat: onClick 함수에 이벤트를 넘겨주도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
YWTechIT committed Jan 15, 2025
1 parent 60904f5 commit 1868e97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/router/src/common/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { MouseEvent } from 'react'
import { AppSpecificLinkProps } from '@titicaca/react-triple-client-interfaces'

import { AllowSourceProps } from './disabled-link-notifier'
Expand All @@ -16,7 +17,7 @@ export type LinkCommonProps = {
* anchor를 클릭했을 때 작동하는 핸들러입니다.
* `allowSource` 조건에 의해 사용할 수 없는 링크이면 클릭해도 작동하지 않습니다.
*/
onClick?: () => void
onClick?: (e: MouseEvent<HTMLAnchorElement>) => void
className?: string
} & HrefProps &
TargetProps &
Expand Down
2 changes: 1 addition & 1 deletion packages/router/src/local/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function LocalLink({

const handleClick: MouseEventHandler<HTMLAnchorElement> = async (e) => {
if (onClick) {
onClick()
onClick(e)
}

await handleHrefLocally({
Expand Down

0 comments on commit 1868e97

Please sign in to comment.