(props: LinkDOMProps)
| 161 | } |
| 162 | |
| 163 | export function useSyntheticLinkProps(props: LinkDOMProps): DOMAttributes<HTMLElement> { |
| 164 | let router = useRouter(); |
| 165 | // oxlint-disable-next-line react/react-compiler |
| 166 | const href = router.useHref(props.href ?? ''); |
| 167 | return { |
| 168 | 'data-href': props.href ? href : undefined, |
| 169 | 'data-target': props.target, |
| 170 | 'data-rel': props.rel, |
| 171 | 'data-download': props.download, |
| 172 | 'data-ping': props.ping, |
| 173 | 'data-referrer-policy': props.referrerPolicy |
| 174 | } as DOMAttributes<HTMLElement>; |
| 175 | } |
| 176 | |
| 177 | /** @deprecated - For backward compatibility. */ |
| 178 | export function getSyntheticLinkProps(props: LinkDOMProps): DOMAttributes<HTMLElement> { |
no test coverage detected