- addressing feedback

This commit is contained in:
2025-12-04 19:14:14 +00:00
parent 3af4e585e7
commit 9208470e53
13 changed files with 229 additions and 48 deletions

View File

@@ -0,0 +1,19 @@
import { useQuery } from "@tanstack/react-query";
import { CAMBASE } from "../../../utils/config";
const fetchCustomFields = async () => {
const response = await fetch(`${CAMBASE}/api/fetch-config?id=SightingAmmend0-custom-fields`);
if (!response.ok) {
throw new Error("Network response was not ok");
}
return response.json();
};
export const useCustomFields = () => {
const customFieldsQuery = useQuery({
queryKey: ["customFields"],
queryFn: fetchCustomFields,
});
return { customFieldsQuery };
};