You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			26 lines
		
	
	
		
			725 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			26 lines
		
	
	
		
			725 B
		
	
	
	
		
			TypeScript
		
	
| import React from 'react';
 | |
| 
 | |
| import { useSelector } from 'react-redux';
 | |
| import { getRightOverlayMode } from '../../../state/selectors/section';
 | |
| import { OverlayDisappearingMessages } from './overlay/disappearing-messages/OverlayDisappearingMessages';
 | |
| import { OverlayRightPanelSettings } from './overlay/OverlayRightPanelSettings';
 | |
| 
 | |
| const ClosableOverlay = () => {
 | |
|   const rightOverlayMode = useSelector(getRightOverlayMode);
 | |
| 
 | |
|   switch (rightOverlayMode) {
 | |
|     case 'disappearing-messages':
 | |
|       return <OverlayDisappearingMessages />;
 | |
|     default:
 | |
|       return <OverlayRightPanelSettings />;
 | |
|   }
 | |
| };
 | |
| 
 | |
| export const RightPanel = () => {
 | |
|   return (
 | |
|     <div className="right-panel">
 | |
|       <ClosableOverlay />
 | |
|     </div>
 | |
|   );
 | |
| };
 |