Skip to content

Commit

Permalink
fix: extraProps missing in routerlink
Browse files Browse the repository at this point in the history
Fix #957
  • Loading branch information
Grafikart committed May 15, 2024
1 parent 094894d commit 12e1d4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
7 changes: 1 addition & 6 deletions src/components/shared/MDLabel/MDLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
type ComponentProps,
Fragment,
type PropsWithChildren,
type ReactNode,
} from 'react';
import { Fragment, type PropsWithChildren } from 'react';
import Markdown, { type Components } from 'react-markdown';
import { MarkdownLink } from './MarkdownLink';
import remarkBreaks from 'remark-breaks';
Expand Down
14 changes: 10 additions & 4 deletions src/components/shared/MDLabel/MarkdownLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ export const MarkdownLink = slottableComponent<Props>(
return (
<>
{isAbsoluteLink ? (
<a href={href} target="_blank" rel="noopener noreferrer" id={id}>
{children}
</a>
) : (
<RouterLink to={href} id={id} {...extraProps}>
{children}
</RouterLink>
) : (
<a
href={href}
target="_blank"
rel="noopener noreferrer"
id={id}
{...extraProps}
>
{children}
</a>
)}
{tooltip && (
<Tooltip className="tooltip-content" id={`tooltip-${id}`}>
Expand Down

0 comments on commit 12e1d4d

Please sign in to comment.