Two JS small fixes (worth for main)

This commit is contained in:
Igor Katson 2024-04-29 18:45:59 +01:00
parent 7450e43eb8
commit da3e199c91
2 changed files with 2 additions and 1 deletions

View file

@ -212,7 +212,7 @@ const FileTreeComponent: React.FC<{
<FormCheckbox
checked={selectedFiles.has(file.id)}
label={`${file.filename} (${formatBytes(file.length)})`}
name={`file-${file.id}`}
name={`torrent-${torrentId}-file-${file.id}`}
disabled={disabled}
onChange={() => handleToggleFile(file.id)}
labelLink={fileLink(file)}

View file

@ -11,6 +11,7 @@ export const IconButton: React.FC<{
props;
const onClickStopPropagation: MouseEventHandler<HTMLAnchorElement> = (e) => {
e.stopPropagation();
e.preventDefault();
if (disabled) {
return;
}