Files
cal.diy/apps/web/components/ui/LinkText.tsx
T
+9 b7892b10ef Add/Edit location dialog: "can't find the right video app? visit our app store" (#4990)
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]>
2022-10-21 18:50:15 +01:00

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>
);
};