refactor to use new settings return type

This commit is contained in:
Alex Holliday committed 2025-05-09 14:54:28 -07:00
1 parent 2f93b70d7f
commit fc655e7711
5 files changed
+57 -49

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ import { networkService } from "../main";
import { createToast } from "../Utils/toastUtils";
import { useTranslation } from "react-i18next";
const useFetchSettings = ({ setSettings }) => {
const useFetchSettings = ({ setSettingsData }) => {
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(undefined);
useEffect(() => {
@@ -11,7 +11,7 @@ const useFetchSettings = ({ setSettings }) => {
setIsLoading(true);
try {
const response = await networkService.getAppSettings();
setSettings(response?.data?.data);
setSettingsData(response?.data?.data);
} catch (error) {
createToast({ body: "Failed to fetch settings" });
setError(error);