// Copyright (C) 2017-2024 Smart code 203358507 import React, { ChangeEvent, useCallback, useState } from 'react'; import { useTranslation } from 'react-i18next'; import Icon from '@stremio/stremio-icons/react'; import { Button, TextInput } from 'stremio/components'; import styles from './AddItem.less'; type Props = { onCancel: () => void; handleAddUrl: (url: string) => void; }; const AddItem = ({ onCancel, handleAddUrl }: Props) => { const { t } = useTranslation(); const [inputValue, setInputValue] = useState(''); const handleValueChange = useCallback(({ target }: ChangeEvent) => { setInputValue(target.value); }, []); const onSubmit = useCallback(() => { handleAddUrl(inputValue); }, [inputValue]); return (
); }; export default AddItem;