2024-02-21 02:13:48 -08:00
|
|
|
import { CodeHighlight } from "@mantine/code-highlight";
|
|
|
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
|
|
|
2024-03-07 04:16:54 -08:00
|
|
|
export default function ConfigPage() {
|
2024-02-21 02:13:48 -08:00
|
|
|
const {
|
|
|
|
data: {
|
|
|
|
data: { yaml },
|
|
|
|
},
|
|
|
|
} = useSuspenseQuery<{ data: { yaml: string } }>({
|
|
|
|
queryKey: ["config"],
|
|
|
|
queryFn: () => {
|
|
|
|
return fetch("/api/v1/status/config").then((res) => res.json());
|
|
|
|
},
|
|
|
|
});
|
2024-03-07 04:16:54 -08:00
|
|
|
return (
|
|
|
|
<CodeHighlight
|
|
|
|
code={yaml}
|
|
|
|
language="yaml"
|
|
|
|
miw="30vw"
|
|
|
|
w="fit-content"
|
|
|
|
maw="calc(100vw - 75px)"
|
|
|
|
mx="auto"
|
|
|
|
mt="lg"
|
|
|
|
/>
|
|
|
|
);
|
2024-02-21 02:13:48 -08:00
|
|
|
}
|