Skip to content

Commit

Permalink
Update Link.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Jul 17, 2024
1 parent 683a329 commit 6c12a7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/toolpad-core/src/shared/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import { RouterContext } from '../AppProvider';
*/

export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
history: 'push' | 'replace';
history?: 'auto' | 'push' | 'replace';
}

export const Link = React.forwardRef(function Link(
props: LinkProps,
ref: React.ForwardedRef<HTMLAnchorElement>,
) {
const { children, href, onClick, history = 'push', ...rest } = props;
const { children, href, onClick, history, ...rest } = props;
const routerContext = React.useContext(RouterContext);

const handleLinkClick = React.useMemo(() => {
Expand Down

0 comments on commit 6c12a7e

Please sign in to comment.