Add OSD and Payload configuration components with toggle functionality

This commit is contained in:
2025-12-18 13:38:27 +00:00
parent b79da7048e
commit b328d25bc7
8 changed files with 190 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
import { useQuery } from "@tanstack/react-query";
const fetchPayloadConfig = async () => {
const response = await fetch("/api/payload-config");
if (!response.ok) throw new Error("Failed to fetch payload config");
return response.json();
};
export const usePayloadCongfig = () => {
const payloadConfigQuery = useQuery({
queryKey: ["payloadConfig"],
queryFn: fetchPayloadConfig,
});
return { payloadConfigQuery };
};