+9








b7892b10ef
Co-authored-by: Nitesh Singh <[email protected]> Co-authored-by: Matheus Benini Ferreira <[email protected]> Co-authored-by: gitstart <[email protected]> Co-authored-by: gitstart <[email protected]> Co-authored-by: Rafael Toledo <[email protected]> Co-authored-by: Matheus Benini <[email protected]> Co-authored-by: Murilo Amaral <[email protected]> Co-authored-by: Rubens Rafael <[email protected]> Co-authored-by: Thiago Nascimbeni <[email protected]> Co-authored-by: Rafael <[email protected]> Co-authored-by: Grace Nshokano <[email protected]> Co-authored-by: MuriloAmarals <[email protected]> Co-authored-by: Matheus Muniz <[email protected]> Co-authored-by: Júlio Piubello da Silva Cabral <[email protected]> Co-authored-by: Matheus Muniz <[email protected]> Co-authored-by: C000Ldude <[email protected]> Co-authored-by: Klinger Matheus <[email protected]> Co-authored-by: Eman <[email protected]>
23 lines
619 B
TypeScript
23 lines
619 B
TypeScript
import Link from "next/link";
|
|
|
|
interface ILinkTextProps {
|
|
href: string;
|
|
children: React.ReactNode;
|
|
classNameChildren?: string;
|
|
target?: string;
|
|
}
|
|
/**
|
|
* This component had to be made in order to make i18n work with next/link
|
|
* @see https://github.com/i18next/react-i18next/issues/1090#issuecomment-615426145
|
|
**/
|
|
export const LinkText = (props: ILinkTextProps) => {
|
|
const { target, href, children, classNameChildren, ...moreProps } = props;
|
|
return (
|
|
<Link href={href || ""} {...moreProps}>
|
|
<a target={target || ""} className={classNameChildren}>
|
|
{children}
|
|
</a>
|
|
</Link>
|
|
);
|
|
};
|