fix: missing key translate for server add url

This commit is contained in:
Fawazorg 2026-02-09 00:17:46 +03:00
parent ce2c021e5f
commit 1e0963e8af

View file

@ -1,6 +1,7 @@
// Copyright (C) 2017-2024 Smart code 203358507 // Copyright (C) 2017-2024 Smart code 203358507
import React, { ChangeEvent, useCallback, useState } from 'react'; import React, { ChangeEvent, useCallback, useState } from 'react';
import { useTranslation } from 'react-i18next';
import Icon from '@stremio/stremio-icons/react'; import Icon from '@stremio/stremio-icons/react';
import { Button, TextInput } from 'stremio/components'; import { Button, TextInput } from 'stremio/components';
import styles from './AddItem.less'; import styles from './AddItem.less';
@ -11,6 +12,7 @@ type Props = {
}; };
const AddItem = ({ onCancel, handleAddUrl }: Props) => { const AddItem = ({ onCancel, handleAddUrl }: Props) => {
const { t } = useTranslation();
const [inputValue, setInputValue] = useState(''); const [inputValue, setInputValue] = useState('');
const handleValueChange = useCallback(({ target }: ChangeEvent<HTMLInputElement>) => { const handleValueChange = useCallback(({ target }: ChangeEvent<HTMLInputElement>) => {
@ -28,7 +30,7 @@ const AddItem = ({ onCancel, handleAddUrl }: Props) => {
value={inputValue} value={inputValue}
onChange={handleValueChange} onChange={handleValueChange}
onSubmit={onSubmit} onSubmit={onSubmit}
placeholder={'Enter URL'} placeholder={t('SETTINGS_SERVER_ADD_URL_PLACEHOLDER')}
/> />
<div className={styles['actions']}> <div className={styles['actions']}>
<Button className={styles['add']} onClick={onSubmit}> <Button className={styles['add']} onClick={onSubmit}>