Skip to content

Commit

Permalink
refactor(components): deprecate custom Link components in favor of re…
Browse files Browse the repository at this point in the history
…act-router-dom
  • Loading branch information
Daydreamer-riri committed Jan 11, 2025
1 parent 6e7e898 commit bc63725
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/components/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import React, { forwardRef } from 'react'
import { Link as RRLink, NavLink as RRNavLink, useLinkClickHandler } from 'react-router-dom'
import type { LinkProps, NavLinkProps } from 'react-router-dom'

/**
* @deprecated Please use `Link` from 'react-router-dom' instead.
*/
export const Link = forwardRef((props: LinkProps, ref: Ref<HTMLAnchorElement>) => {
const {
replace,
Expand Down Expand Up @@ -42,6 +45,9 @@ export const Link = forwardRef((props: LinkProps, ref: Ref<HTMLAnchorElement>) =

Link.displayName = 'Link'

/**
* @deprecated Please use `NavLink` from 'react-router-dom' instead.
*/
export const NavLink = forwardRef((props: NavLinkProps, ref: Ref<HTMLAnchorElement>) => {
const {
replace,
Expand Down

0 comments on commit bc63725

Please sign in to comment.