Files
calendar/apps/web/components/ui/LinkText.tsx
T
1b541ff214 Fix/connected calendar component (#3956)
* Fix for displaying connected calendars alert with test

* Fix default calendar display string when externalId its too long

* Update apps/web/components/ui/LinkText.tsx

Co-authored-by: Omar López <zomars@me.com>

Co-authored-by: Omar López <zomars@me.com>
2022-08-24 19:44:14 -06:00

20 lines
554 B
TypeScript

import Link from "next/link";
interface ILinkTextProps {
href: string;
children: React.ReactNode;
classNameChildren?: 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 { href, children, classNameChildren, ...moreProps } = props;
return (
<Link href={href || ""} {...moreProps}>
<a className={classNameChildren}>{children}</a>
</Link>
);
};