mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: simplify dtos and improve type saftey in json returns
This commit is contained in:
@@ -114,7 +114,7 @@ export const CreateScheduleForm = ({ initialValues, onSubmit, volume, loading, s
|
||||
<SelectValue placeholder="Select a repository" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{repositoriesData?.repositories.map((repo) => (
|
||||
{repositoriesData?.map((repo) => (
|
||||
<SelectItem key={repo.id} value={repo.id}>
|
||||
<span className="flex items-center gap-2">
|
||||
<RepositoryIcon backend={repo.type} />
|
||||
|
||||
@@ -35,7 +35,7 @@ export const HealthchecksCard = ({ volume }: Props) => {
|
||||
...updateVolumeMutation(),
|
||||
onSuccess: (d) => {
|
||||
toast.success("Volume updated", {
|
||||
description: `Auto remount is now ${d.volume.autoRemount ? "enabled" : "paused"}.`,
|
||||
description: `Auto remount is now ${d.autoRemount ? "enabled" : "paused"}.`,
|
||||
});
|
||||
},
|
||||
onError: (error) => {
|
||||
|
||||
@@ -51,7 +51,7 @@ export const VolumeBackupsTabContent = ({ volume }: Props) => {
|
||||
|
||||
const [isEnabled, setIsEnabled] = useState(existingSchedule?.enabled ?? true);
|
||||
|
||||
const repositories = repositoriesData?.repositories || [];
|
||||
const repositories = repositoriesData || [];
|
||||
const selectedRepository = repositories.find((r) => r.id === (existingSchedule?.repositoryId ?? ""));
|
||||
|
||||
const summary = useMemo(() => {
|
||||
|
||||
@@ -38,7 +38,7 @@ export const DockerTabContent = ({ volume }: Props) => {
|
||||
refetchOnWindowFocus: true,
|
||||
});
|
||||
|
||||
const containers = containersData?.containers || [];
|
||||
const containers = containersData || [];
|
||||
|
||||
const getStateClass = (state: string) => {
|
||||
switch (state) {
|
||||
|
||||
Reference in New Issue
Block a user