(props: LinkDOMProps)
| 178 | } |
| 179 | |
| 180 | export function useSyntheticLinkProps(props: LinkDOMProps): DOMAttributes<HTMLElement> { |
| 181 | let router = useRouter(); |
| 182 | // oxlint-disable-next-line react/react-compiler |
| 183 | const href = router.useHref(props.href ?? ''); |
| 184 | return { |
| 185 | 'data-href': props.href ? href : undefined, |
| 186 | 'data-target': props.target, |
| 187 | 'data-rel': props.rel, |
| 188 | 'data-download': props.download, |
| 189 | 'data-ping': props.ping, |
| 190 | 'data-referrer-policy': props.referrerPolicy |
| 191 | } as DOMAttributes<HTMLElement>; |
| 192 | } |
| 193 | |
| 194 | /** @deprecated - For backward compatibility. */ |
| 195 | export function getSyntheticLinkProps(props: LinkDOMProps): DOMAttributes<HTMLElement> { |
no test coverage detected