1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

clean up GenresView & GenresItemsContainer

This commit is contained in:
grafixeyehero 2022-10-29 02:07:24 +03:00
parent 1c6b1fc478
commit 071e7d15d9
4 changed files with 101 additions and 142 deletions

View file

@ -1,22 +1,25 @@
import React, { FC } from 'react';
const createElement = ({ className }: IProps) => ({
const createElement = ({ className, dataId }: IProps) => ({
__html: `<div
is="emby-itemscontainer"
class="${className}"
${dataId}
>
</div>`
});
interface IProps {
className?: string;
dataId?: string;
}
const ItemsContainerElement: FC<IProps> = ({ className }) => {
const ItemsContainerElement: FC<IProps> = ({ className, dataId }) => {
return (
<div
dangerouslySetInnerHTML={createElement({
className: className
className: className,
dataId: dataId ? `data-id="${dataId}"` : ''
})}
/>
);