You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
526 B
21 lines
526 B
4 years ago
|
import { FunctionComponent } from 'react';
|
||
|
import Link from 'next/link';
|
||
|
|
||
|
import { SimpleLinkProps } from '../../types/SimpleLinkProps';
|
||
|
|
||
|
const SimpleLink: FunctionComponent<SimpleLinkProps> = ({
|
||
|
linkProps,
|
||
|
anchorProps = {},
|
||
|
children,
|
||
|
}) => {
|
||
|
return (
|
||
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
||
|
<Link {...{ passRef: true, ...linkProps }}>
|
||
|
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
|
||
|
<a {...anchorProps}>{children}</a>
|
||
|
</Link>
|
||
|
);
|
||
|
};
|
||
|
|
||
|
export default SimpleLink;
|