fix: liniting

This commit is contained in:
Timothy Z. 2024-10-24 10:30:16 +03:00
parent 9fa17da6e9
commit 04fdc644f6
4 changed files with 9 additions and 9 deletions

View file

@ -16,7 +16,7 @@ const useStreamingServerUrls = () => {
const dateA = new Date(a._mtime).getTime();
const dateB = new Date(b._mtime).getTime();
return dateA - dateB;
})
});
const onAdd = useCallback((url) => {
const isValidUrl = (url) => {
@ -88,7 +88,7 @@ const useStreamingServerUrls = () => {
onDelete,
onSelect,
onReload
}
};
return { streamingServerUrls, actions };
};

View file

@ -16,7 +16,7 @@ type ViewModeProps = {
url: string;
onDelete?: (url: string) => void;
onSelect?: (url: string) => void;
}
};
const ViewMode = ({ url, onDelete, onSelect }: ViewModeProps) => {
const { t } = useTranslation();
@ -79,7 +79,7 @@ type AddModeProps = {
handleValueChange: (event: ChangeEvent<HTMLInputElement>) => void;
onAdd?: (url: string) => void;
onCancel?: () => void;
}
};
const AddMode = ({ inputValue, handleValueChange, onAdd, onCancel }: AddModeProps) => {
const handleAdd = useCallback(() => {

View file

@ -1,5 +1,5 @@
// Copyright (C) 2017-2024 Smart code 203358507
import Item from './Item'
import Item from './Item';
export default Item;

View file

@ -1,6 +1,6 @@
// Copyright (C) 2017-2024 Smart code 203358507
import React, { useCallback, useState } from 'react'
import React, { useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next';
import styles from './URLsManager.less';
import Button from 'stremio/common/Button';
@ -15,7 +15,7 @@ const URLsManager = () => {
const onAdd = () => {
setAddMode(true);
}
};
const onCancel = () => {
setAddMode(false);
@ -30,7 +30,7 @@ const URLsManager = () => {
<div className={styles['wrapper']}>
<div className={styles['header']}>
<div className={styles['label']}>URL</div>
<div className={styles['label']}>{ t('STATUS') }</div>
<div className={styles['label']}>{t('STATUS')}</div>
</div>
<div className={styles['content']}>
{
@ -47,7 +47,7 @@ const URLsManager = () => {
<div className={styles['footer']}>
<Button label={'Add URL'} className={styles['add-url']} onClick={onAdd}>
<Icon name={'add'} className={styles['icon']} />
{ t('SETTINGS_SERVER_ADD_URL') }
{t('SETTINGS_SERVER_ADD_URL')}
</Button>
<Button className={styles['reload']} title={'Reload'} onClick={actions.onReload}>
<Icon name={'reset'} className={styles['icon']} />