From 1412beb6c4f9899f58db2ce09e5f84ea827a4fb8 Mon Sep 17 00:00:00 2001 From: "Kalle (Sendou)" <38327916+Sendouc@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:53:04 +0200 Subject: [PATCH] markdown open links to new window --- components/common/Markdown.tsx | 2 +- components/common/MyLink.tsx | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/common/Markdown.tsx b/components/common/Markdown.tsx index 87da4d3e7..d6fdae526 100644 --- a/components/common/Markdown.tsx +++ b/components/common/Markdown.tsx @@ -76,7 +76,7 @@ const Markdown: React.FC = ({ link: (props: any) => { const { children } = props; return ( - + {children} ); diff --git a/components/common/MyLink.tsx b/components/common/MyLink.tsx index c999eed10..caffc5c3f 100644 --- a/components/common/MyLink.tsx +++ b/components/common/MyLink.tsx @@ -8,6 +8,7 @@ interface Props { isExternal?: boolean; prefetch?: boolean; isColored?: boolean; + toNewWindow?: boolean; } const MyLink: React.FC = ({ @@ -16,12 +17,17 @@ const MyLink: React.FC = ({ isExternal, prefetch = false, isColored = true, + toNewWindow, }) => { const { themeColorShade } = useMyTheme(); if (isExternal) { return ( - + {children} );