From 7731938729bd35bace8e8dc8dba40d148b8d48dc Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Tue, 24 Oct 2023 13:27:10 +0200 Subject: [PATCH] Add target _blank to button component --- src/components/Button.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 8ce43a98..e6d012c0 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -47,6 +47,13 @@ export function Button(props: Props) { history.push(href); } + if (props.href && props.href.startsWith("https://")) + return ( + + {content} + + ); + if (props.href) return ( goTo(props.href || "")}>