Skip to content

Commit

Permalink
storage UI: Use correct source for devices information
Browse files Browse the repository at this point in the history
  • Loading branch information
ancorgs committed Nov 12, 2024
1 parent ac8255b commit 82df4c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/src/components/storage/ConfigEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import React, {useState} from "react";
import { _ } from "~/i18n";
import { sprintf } from "sprintf-js";
import { useAvailableDevices, useConfigDevices } from "~/queries/storage";
import { useDevices, useConfigDevices } from "~/queries/storage";
import { config as type } from "~/api/storage/types";
import { StorageDevice } from "~/types/storage";
import { deviceSize, SPACE_POLICIES } from "~/components/storage/utils";
Expand Down Expand Up @@ -173,12 +173,12 @@ function DriveEditor({ drive, driveDevice }: DriveEditorProps) {

export default function ConfigEditor() {
const drives = useConfigDevices();
const availableDevices = useAvailableDevices();
const devices = useDevices("system", { suspense: true });

return (
<List isPlain isBordered>
{drives.map((drive, i) => {
const device = availableDevices.find((d) => d.name === drive.name);
const device = devices.find((d) => d.name === drive.name);

return <DriveEditor key={i} drive={drive} driveDevice={device} />
})}
Expand Down

0 comments on commit 82df4c7

Please sign in to comment.