bigbluebutton-Github/bigbluebutton-html5/imports/ui/services/settings/hooks/useSettings.ts
Ramón Souza 7514066fc3
fix: Client can't load in certain cases (#20336)
* move settings

* remove meteor cache files
2024-05-29 09:26:11 -04:00

14 lines
422 B
TypeScript

import { useReactiveVar } from '@apollo/client';
import { SETTINGS } from '../enums';
import { getSettingsSingletonInstance } from '..';
const useSettings = (setting: typeof SETTINGS[keyof typeof SETTINGS]) => {
const prop = `${setting}Var`;
// @ts-ignore JS code
const Settings = getSettingsSingletonInstance();
const variable = Settings[prop];
return useReactiveVar(variable);
};
export default useSettings;