import React from 'react'; import { useDispatch } from 'react-redux'; import styled from 'styled-components'; import { closeRightPanel } from '../../../../../state/ducks/conversations'; import { resetRightOverlayMode } from '../../../../../state/ducks/section'; import { Flex } from '../../../../basic/Flex'; import { SessionIconButton } from '../../../../icon'; const StyledTitle = styled.h2` font-family: var(--font-default); text-align: center; margin-top: 0px; margin-bottom: 0px; `; const StyledSubTitle = styled.h3` font-family: var(--font-default); font-size: 11px; font-weight: 400; text-align: center; padding-top: 0px; margin-top: 0; `; type HeaderProps = { title: string; subtitle: string; }; export const Header = (props: HeaderProps) => { const { title, subtitle } = props; const dispatch = useDispatch(); return ( { dispatch(resetRightOverlayMode()); }} /> {title} {subtitle} { dispatch(closeRightPanel()); dispatch(resetRightOverlayMode()); }} /> ); };