Skip to content

Commit

Permalink
Fix drop folder type in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithmohan committed Feb 22, 2025
1 parent 172b634 commit 5c960fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/dashboard/panels/ImportFolders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function ImportFolders() {
if (folder.DropFolderType === 'Both') flags = 'Source, Destination';
else if (folder.DropFolderType !== 'None') flags = folder.DropFolderType ?? '';

if (folder.WatchForNewFiles) flags += folder.DropFolderType ? ', Watch' : 'Watch';
if (folder.WatchForNewFiles) flags += flags ? ', Watch' : 'Watch';

return (
<div key={folder.ID} className="flex flex-col border-t border-panel-border py-6 first:border-t-0">
Expand Down
2 changes: 1 addition & 1 deletion src/pages/firstrun/ImportFolders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Folder = (props: ImportFolderType) => {
if (DropFolderType === 'Both') tempFlags = 'Source, Destination';
else if (DropFolderType !== 'None') tempFlags = DropFolderType ?? '';

if (WatchForNewFiles) tempFlags += DropFolderType ? ', Watch' : 'Watch';
if (WatchForNewFiles) tempFlags += tempFlags ? ', Watch' : 'Watch';

return tempFlags;
}, [DropFolderType, WatchForNewFiles]);
Expand Down

0 comments on commit 5c960fb

Please sign in to comment.