Skip to content

Commit a284c5b

Browse files
committed
minor react warning fixes
1 parent e7593e0 commit a284c5b

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/renderer/components/downloads/DownloadQueue.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const DownloadQueue: React.FC = () => {
5959

6060
const value = task.page && task.totalPages ? (task.page / task.totalPages) * 100 : 0;
6161
return (
62-
<Card className="w-full">
62+
<Card key={`${task.series.id}-${task.chapter.id}`} className="w-full">
6363
<CardHeader className="px-4 pt-3 pb-2">
6464
<CardTitle>
6565
{task.series.title} - Chapter {task.chapter.chapterNumber}

src/renderer/components/settings/SettingsKeybinds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const SettingsKeybinds: React.FC = () => {
133133
setting: ReaderSetting.KeyToggleShowingSidebar,
134134
},
135135
].map((entry) => (
136-
<div className="flex space-x-2 items-center">
136+
<div key={entry.setting} className="flex space-x-2 items-center">
137137
<Button
138138
size="sm"
139139
className="w-28 justify-center font-semibold"

src/renderer/components/settings/SettingsLibrary.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
} from '@/renderer/state/settingStates';
1111
import { Checkbox } from '@/ui/components/Checkbox';
1212
import { Label } from '@/ui/components/Label';
13-
import { Input } from '@/ui/components/Input';
1413
import { Button } from '@/ui/components/Button';
1514

1615
const defaultDownloadsDir = await ipcRenderer.invoke(ipcChannels.GET_PATH.DEFAULT_DOWNLOADS_DIR);
@@ -59,9 +58,10 @@ export const SettingsLibrary: React.FC = () => {
5958
<div className="grid w-full items-center gap-1.5">
6059
<Label htmlFor="picture">Custom download location</Label>
6160
<div className="flex w-full items-center space-x-2">
62-
<Input
63-
className="cursor-pointer"
64-
value={customDownloadsDir || defaultDownloadsDir}
61+
<Button
62+
className="w-full truncate"
63+
variant="outline"
64+
title={customDownloadsDir || defaultDownloadsDir}
6565
onClick={() =>
6666
ipcRenderer
6767
.invoke(ipcChannels.APP.SHOW_OPEN_DIALOG, true, [], 'Select Downloads Directory')
@@ -71,7 +71,9 @@ export const SettingsLibrary: React.FC = () => {
7171
}
7272
})
7373
}
74-
/>
74+
>
75+
{customDownloadsDir || defaultDownloadsDir}
76+
</Button>
7577
{customDownloadsDir && <Button onClick={() => setCustomDownloadsDir('')}>Reset</Button>}
7678
</div>
7779
</div>

0 commit comments

Comments
 (0)