1
0
Fork 0
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:
Yasin Silavi 2023-10-23 23:14:21 +03:30 committed by Bill Thornton
parent b4f745599b
commit 4c76ce11dd
4 changed files with 25 additions and 26 deletions

View file

@ -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}
/>
))
)}
))}
</>
);
};

View file

@ -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;

View file

@ -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;

View file

@ -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;