mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix: remove useless fragments
This commit is contained in:
parent
b4f745599b
commit
4c76ce11dd
4 changed files with 25 additions and 26 deletions
|
@ -18,24 +18,24 @@ const GenresItemsContainer: FC<GenresItemsContainerProps> = ({
|
|||
collectionType,
|
||||
itemType
|
||||
}) => {
|
||||
const { isLoading, data: genresResult } = useGetGenres(
|
||||
itemType,
|
||||
parentId
|
||||
);
|
||||
const { isLoading, data: genresResult } = useGetGenres(itemType, parentId);
|
||||
|
||||
if (isLoading) {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
if (!genresResult?.Items?.length) {
|
||||
return (
|
||||
<>
|
||||
{!genresResult?.Items?.length ? (
|
||||
<div className='noItemsMessage centerMessage'>
|
||||
<h1>{globalize.translate('MessageNothingHere')}</h1>
|
||||
<p>{globalize.translate('MessageNoGenresAvailable')}</p>
|
||||
</div>
|
||||
) : (
|
||||
genresResult?.Items?.map((genre) => (
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{genresResult.Items.map((genre) => (
|
||||
<GenresSectionContainer
|
||||
key={genre.Id}
|
||||
collectionType={collectionType}
|
||||
|
@ -43,8 +43,7 @@ const GenresItemsContainer: FC<GenresItemsContainerProps> = ({
|
|||
itemType={itemType}
|
||||
genre={genre}
|
||||
/>
|
||||
))
|
||||
)}
|
||||
))}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FunctionComponent, useEffect } from 'react';
|
||||
import { FunctionComponent, useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import ServerConnections from './ServerConnections';
|
||||
|
@ -56,7 +56,7 @@ const ServerContentPage: FunctionComponent<ServerContentPageProps> = ({ view })
|
|||
location.search
|
||||
]);
|
||||
|
||||
return <></>;
|
||||
return null;
|
||||
};
|
||||
|
||||
export default ServerContentPage;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FunctionComponent, useEffect } from 'react';
|
||||
import { FunctionComponent, useEffect } from 'react';
|
||||
|
||||
import loading from './loading';
|
||||
|
||||
|
@ -11,7 +11,7 @@ const Loading: FunctionComponent = () => {
|
|||
};
|
||||
}, []);
|
||||
|
||||
return <></>;
|
||||
return null;
|
||||
};
|
||||
|
||||
export default Loading;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { FunctionComponent, useEffect } from 'react';
|
||||
import { FunctionComponent, useEffect } from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import globalize from '../../scripts/globalize';
|
||||
|
@ -79,7 +79,7 @@ const ViewManagerPage: FunctionComponent<ViewManagerPageProps> = ({
|
|||
location.search
|
||||
]);
|
||||
|
||||
return <></>;
|
||||
return null;
|
||||
};
|
||||
|
||||
export default ViewManagerPage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue