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:
parent
1c6b1fc478
commit
071e7d15d9
4 changed files with 101 additions and 142 deletions
|
@ -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}"` : ''
|
||||
})}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue