From aecf74951cecb4de9ca94dd93e48af6f62300a0f Mon Sep 17 00:00:00 2001
From: tobi <31960611+tsmethurst@users.noreply.github.com>
Date: Thu, 25 Apr 2024 18:24:24 +0200
Subject: [chore] Settings refactor 2: the re-refactoring-ing (#2866)

* [chore] Bit more refactoring of settings panel

* fix up some remaining things

* groovy baby yeah!

* remove unused Suspense
---
 web/source/settings/views/user/settings.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'web/source/settings/views/user/settings.tsx')

diff --git a/web/source/settings/views/user/settings.tsx b/web/source/settings/views/user/settings.tsx
index 2827cc53f..cbd973706 100644
--- a/web/source/settings/views/user/settings.tsx
+++ b/web/source/settings/views/user/settings.tsx
@@ -18,18 +18,19 @@
 */
 
 import React from "react";
-import query from "../../lib/query";
 import { useTextInput, useBoolInput } from "../../lib/form";
 import useFormSubmit from "../../lib/form/submit";
 import { Select, TextInput, Checkbox } from "../../components/form/inputs";
 import FormWithData from "../../lib/form/form-with-data";
 import Languages from "../../components/languages";
 import MutationButton from "../../components/form/mutation-button";
+import { useVerifyCredentialsQuery } from "../../lib/query/oauth";
+import { usePasswordChangeMutation, useUpdateCredentialsMutation } from "../../lib/query/user";
 
 export default function UserSettings() {
 	return (
 		<FormWithData
-			dataQuery={query.useVerifyCredentialsQuery}
+			dataQuery={useVerifyCredentialsQuery}
 			DataForm={UserSettingsForm}
 		/>
 	);
@@ -50,7 +51,7 @@ function UserSettingsForm({ data }) {
 		statusContentType: useTextInput("source[status_content_type]", { source: data, defaultValue: "text/plain" }),
 	};
 
-	const [submitForm, result] = useFormSubmit(form, query.useUpdateCredentialsMutation());
+	const [submitForm, result] = useFormSubmit(form, useUpdateCredentialsMutation());
 
 	return (
 		<>
@@ -123,7 +124,7 @@ function PasswordChange() {
 		}
 	});
 
-	const [submitForm, result] = useFormSubmit(form, query.usePasswordChangeMutation());
+	const [submitForm, result] = useFormSubmit(form, usePasswordChangeMutation());
 
 	return (
 		<form className="change-password" onSubmit={submitForm}>
-- 
cgit v1.2.3

