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,33 +18,32 @@ const GenresItemsContainer: FC<GenresItemsContainerProps> = ({
|
||||||
collectionType,
|
collectionType,
|
||||||
itemType
|
itemType
|
||||||
}) => {
|
}) => {
|
||||||
const { isLoading, data: genresResult } = useGetGenres(
|
const { isLoading, data: genresResult } = useGetGenres(itemType, parentId);
|
||||||
itemType,
|
|
||||||
parentId
|
|
||||||
);
|
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return <Loading />;
|
return <Loading />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!genresResult?.Items?.length) {
|
||||||
|
return (
|
||||||
|
<div className='noItemsMessage centerMessage'>
|
||||||
|
<h1>{globalize.translate('MessageNothingHere')}</h1>
|
||||||
|
<p>{globalize.translate('MessageNoGenresAvailable')}</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!genresResult?.Items?.length ? (
|
{genresResult.Items.map((genre) => (
|
||||||
<div className='noItemsMessage centerMessage'>
|
<GenresSectionContainer
|
||||||
<h1>{globalize.translate('MessageNothingHere')}</h1>
|
key={genre.Id}
|
||||||
<p>{globalize.translate('MessageNoGenresAvailable')}</p>
|
collectionType={collectionType}
|
||||||
</div>
|
parentId={parentId}
|
||||||
) : (
|
itemType={itemType}
|
||||||
genresResult?.Items?.map((genre) => (
|
genre={genre}
|
||||||
<GenresSectionContainer
|
/>
|
||||||
key={genre.Id}
|
))}
|
||||||
collectionType={collectionType}
|
|
||||||
parentId={parentId}
|
|
||||||
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 { useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import ServerConnections from './ServerConnections';
|
import ServerConnections from './ServerConnections';
|
||||||
|
@ -56,7 +56,7 @@ const ServerContentPage: FunctionComponent<ServerContentPageProps> = ({ view })
|
||||||
location.search
|
location.search
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return <></>;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ServerContentPage;
|
export default ServerContentPage;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { FunctionComponent, useEffect } from 'react';
|
import { FunctionComponent, useEffect } from 'react';
|
||||||
|
|
||||||
import loading from './loading';
|
import loading from './loading';
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ const Loading: FunctionComponent = () => {
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return <></>;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Loading;
|
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 { useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import globalize from '../../scripts/globalize';
|
import globalize from '../../scripts/globalize';
|
||||||
|
@ -79,7 +79,7 @@ const ViewManagerPage: FunctionComponent<ViewManagerPageProps> = ({
|
||||||
location.search
|
location.search
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return <></>;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ViewManagerPage;
|
export default ViewManagerPage;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue