The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/providers/SidebarProvider.js

15 lines
497 B

import React from 'react';
import { menu } from '../../app/ui-utils/client';
import { SidebarContext } from '../contexts/SidebarContext';
import { useReactiveValue } from '../hooks/useReactiveValue';
const getOpen = () => menu.isOpen();
const setOpen = (open) => (open ? menu.open() : menu.close());
export function SidebarProvider({ children }) {
const contextValue = [useReactiveValue(getOpen, []), setOpen];
return <SidebarContext.Provider children={children} value={contextValue} />;
}