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:
commit
83c30b2280
75 changed files with 1940 additions and 806 deletions
|
@ -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, () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue