mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add eslint rules for sonar issues
This commit is contained in:
parent
2690b90d84
commit
19f416580c
12 changed files with 45 additions and 30 deletions
|
@ -90,8 +90,8 @@ const GenresItemsContainer: FC<GenresItemsContainerProps> = ({
|
|||
<h1>{globalize.translate('MessageNothingHere')}</h1>
|
||||
<p>{globalize.translate('MessageNoGenresAvailable')}</p>
|
||||
</div>
|
||||
) : items.map((item, index) => (
|
||||
<div key={index} className='verticalSection'>
|
||||
) : items.map(item => (
|
||||
<div key={item.Id} className='verticalSection'>
|
||||
<div
|
||||
className='sectionTitleContainer sectionTitleContainer-cards padded-left'
|
||||
dangerouslySetInnerHTML={createLinkElement({
|
||||
|
|
|
@ -610,7 +610,7 @@ export default function () {
|
|||
function onTimeUpdate() {
|
||||
const now = new Date().getTime();
|
||||
|
||||
if (!(now - lastUpdateTime < 700)) {
|
||||
if (now - lastUpdateTime >= 700) {
|
||||
lastUpdateTime = now;
|
||||
const player = this;
|
||||
currentRuntimeTicks = playbackManager.duration(player);
|
||||
|
|
|
@ -125,7 +125,7 @@ const LiveTVSearchResults: FunctionComponent<LiveTVSearchResultsProps> = ({ serv
|
|||
'searchResults',
|
||||
'padded-bottom-page',
|
||||
'padded-top',
|
||||
{ 'hide': !query || !(collectionType === 'livetv') }
|
||||
{ 'hide': !query || collectionType !== 'livetv' }
|
||||
)}
|
||||
>
|
||||
<SearchResultsRow
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import debounce from 'lodash-es/debounce';
|
||||
import React, { FunctionComponent, useEffect, useMemo, useRef } from 'react';
|
||||
import React, { FunctionComponent, useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
|
||||
import AlphaPicker from '../alphaPicker/AlphaPickerComponent';
|
||||
import globalize from '../../scripts/globalize';
|
||||
|
@ -53,7 +53,7 @@ const SearchFields: FunctionComponent<SearchFieldsProps> = ({ onSearch = () => {
|
|||
};
|
||||
}, [debouncedOnSearch]);
|
||||
|
||||
const onAlphaPicked = (e: Event) => {
|
||||
const onAlphaPicked = useCallback((e: Event) => {
|
||||
const value = (e as CustomEvent).detail.value;
|
||||
const searchInput = getSearchInput();
|
||||
|
||||
|
@ -70,7 +70,7 @@ const SearchFields: FunctionComponent<SearchFieldsProps> = ({ onSearch = () => {
|
|||
}
|
||||
|
||||
searchInput.dispatchEvent(new CustomEvent('input', { bubbles: true }));
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue