From 30bce48c2385b4960a4b94355b29fbf48ffdbce7 Mon Sep 17 00:00:00 2001 From: David Stensland Date: Sat, 24 Feb 2024 12:27:37 -0800 Subject: [PATCH] use LinkButton in SectionTitleContainer --- src/elements/SectionTitleContainer.tsx | 13 +++++---- src/elements/SectionTitleLinkElement.tsx | 35 ------------------------ 2 files changed, 8 insertions(+), 40 deletions(-) delete mode 100644 src/elements/SectionTitleLinkElement.tsx diff --git a/src/elements/SectionTitleContainer.tsx b/src/elements/SectionTitleContainer.tsx index 88aa01c26c..d60d8bbcb4 100644 --- a/src/elements/SectionTitleContainer.tsx +++ b/src/elements/SectionTitleContainer.tsx @@ -1,6 +1,7 @@ import React, { FunctionComponent } from 'react'; import IconButtonElement from './IconButtonElement'; -import SectionTitleLinkElement from './SectionTitleLinkElement'; +import LinkButton from './emby-button/LinkButton'; +import globalize from '../scripts/globalize'; type IProps = { SectionClassName?: string; @@ -28,11 +29,13 @@ const SectionTitleContainer: FunctionComponent = ({ SectionClassName, ti icon={btnIcon} />} - {isLinkVisible && } + target='_blank' + rel='noopener noreferrer' + href={url}> + {globalize.translate('Help')} + } ); diff --git a/src/elements/SectionTitleLinkElement.tsx b/src/elements/SectionTitleLinkElement.tsx deleted file mode 100644 index 8fd661fc9c..0000000000 --- a/src/elements/SectionTitleLinkElement.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React, { FunctionComponent } from 'react'; - -import globalize from 'lib/globalize'; - -const createLinkElement = ({ className, title, href }: { className?: string, title?: string, href?: string }) => ({ - __html: ` - ${title} - ` -}); - -type IProps = { - title?: string; - className?: string; - url?: string -}; - -const SectionTitleLinkElement: FunctionComponent = ({ className, title, url }: IProps) => { - return ( -
- ); -}; - -export default SectionTitleLinkElement;