MCPcopy
hub / github.com/simstudioai/sim / useGeneralSettings

Function useGeneralSettings

apps/sim/hooks/queries/general-settings.ts:74–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 * TanStack Query is now the single source of truth for general settings.
73 */
74export function useGeneralSettings() {
75 return useQuery({
76 queryKey: generalSettingsKeys.settings(),
77 queryFn: async ({ signal }) => {
78 const settings = await fetchGeneralSettings(signal)
79 syncThemeToNextThemes(settings.theme)
80 return settings
81 },
82 staleTime: 60 * 60 * 1000,
83 })
84}
85
86/**
87 * Prefetch general settings into a QueryClient cache.

Callers 11

SettingsLoaderFunction · 0.90
GeneralFunction · 0.90
AdminFunction · 0.90
SettingsSidebarFunction · 0.90
useAutoConnectFunction · 0.85
useShowTrainingControlsFunction · 0.85
useSnapToGridSizeFunction · 0.85
useShowActionBarFunction · 0.85
useTimezoneFunction · 0.85

Calls 2

syncThemeToNextThemesFunction · 0.90
fetchGeneralSettingsFunction · 0.85

Tested by

no test coverage detected