Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/fix/17244

 Conflicts:
	src/components/views/spaces/SpaceCreateMenu.tsx
This commit is contained in:
Michael Telatynski 2021-06-15 12:24:26 +01:00
commit 83c30b2280
75 changed files with 1940 additions and 806 deletions

View file

@ -35,8 +35,8 @@ export const useSettingValue = <T>(settingName: string, roomId: string = null, e
};
// Hook to fetch whether a feature is enabled and dynamically update when that changes
export const useFeatureEnabled = (featureName: string, roomId: string = null) => {
const [enabled, setEnabled] = useState(SettingsStore.getValue(featureName, roomId));
export const useFeatureEnabled = (featureName: string, roomId: string = null): boolean => {
const [enabled, setEnabled] = useState(SettingsStore.getValue<boolean>(featureName, roomId));
useEffect(() => {
const ref = SettingsStore.watchSetting(featureName, roomId, () => {