mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
fix(create-repo): don't try to load rclone remotes if the capability is disabled
This commit is contained in:
@@ -67,8 +67,11 @@ export const CreateRepositoryForm = ({
|
||||
|
||||
const [passwordMode, setPasswordMode] = useState<"default" | "custom">("default");
|
||||
|
||||
const { capabilities } = useSystemInfo();
|
||||
|
||||
const { data: rcloneRemotes, isLoading: isLoadingRemotes } = useQuery({
|
||||
...listRcloneRemotesOptions(),
|
||||
enabled: capabilities.rclone,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -80,8 +83,6 @@ export const CreateRepositoryForm = ({
|
||||
});
|
||||
}, [watchedBackend, form]);
|
||||
|
||||
const { capabilities } = useSystemInfo();
|
||||
|
||||
return (
|
||||
<Form {...form}>
|
||||
<form id={formId} onSubmit={form.handleSubmit(onSubmit)} className={cn("space-y-4", className)}>
|
||||
|
||||
Reference in New Issue
Block a user