convert NewUserPage to react

This commit is contained in:
grafixeyehero 2021-10-02 18:10:14 +03:00
parent 42a593d08a
commit ccecc4a4b1
10 changed files with 439 additions and 190 deletions

View file

@ -0,0 +1,34 @@
import React, { FunctionComponent } from 'react';
import globalize from '../../../../scripts/globalize';
const createLinkElement = ({ className, title, href }) => ({
__html: `<a
is="emby-linkbutton"
rel="noopener noreferrer"
class="${className}"
target="_blank"
href="${href}"
>
${title}
</a>`
});
type IProps = {
title?: string;
className?: string;
url?: string
}
const SectionTitleLinkElement: FunctionComponent<IProps> = ({ className, title, url }: IProps) => {
return (
<div
dangerouslySetInnerHTML={createLinkElement({
className: className,
title: globalize.translate(title),
href: url
})}
/>
);
};
export default SectionTitleLinkElement;