Renamed query hooks. Fixed conversion bugs.

This commit is contained in:
Mike Cao committed 2025-03-22 03:48:18 -07:00
1 parent adca3c36d0
commit 7886c3f393
110 files changed
+423 -489

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import { useEffect } from 'react';
import { useApp, setConfig } from '@/store/app';
import { getConfig } from '@/app/actions/getConfig';
export function useConfig() {
const { config } = useApp();
async function loadConfig() {
setConfig(await getConfig());
}
useEffect(() => {
if (!config) {
loadConfig();
}
}, []);
return config;
}