refactor: minor improvements, better spacing

This commit is contained in:
Timothy Z. 2024-11-29 12:38:29 +02:00
parent ccccce2be1
commit ccde5971f8
2 changed files with 4 additions and 3 deletions

View file

@ -14,8 +14,8 @@ type Props = {
const AddItem = ({ onCancel, handleAddUrl }: Props) => {
const [inputValue, setInputValue] = useState('');
const handleValueChange = useCallback((event: ChangeEvent<HTMLInputElement>) => {
setInputValue(event.target.value);
const handleValueChange = useCallback(({ target }: ChangeEvent<HTMLInputElement>) => {
setInputValue(target.value);
}, []);
const onSumbit = useCallback(() => {

View file

@ -18,9 +18,10 @@ type Props = {
const Item = ({ url }: Props) => {
const { t } = useTranslation();
const profile = useProfile();
const streamingServer = useStreamingServer();
const { deleteServerUrl, selectServerUrl } = useStreamingServerUrls();
const profile = useProfile();
const selected = useMemo(() => profile.settings.streamingServerUrl === url, [url, profile.settings]);
const defaultUrl = useMemo(() => url === DEFAULT_STREAMING_SERVER_URL, [url]);