fix: added onclick function to subtitle

fixed opening correct settings option depending on header option displayed
pull/2660/head
William Grant 2 years ago
parent 96ae50869f
commit 8c345cede0

@ -117,6 +117,7 @@ export const ConversationHeaderSubitle = (props: ConversationHeaderSubitleProps)
<span
role="button"
className="module-conversation-header__title-text"
onClick={onClickFunction}
onKeyPress={(e: any) => {
if (e.key === 'Enter') {
e.preventDefault();

@ -109,7 +109,7 @@ export const ConversationHeaderTitle = () => {
if (isRightPanelOn) {
dispatch(closeRightPanel());
} else {
if (visibleTitleIndex === 2) {
if (visibleTitleIndex === subtitles.length - 1) {
dispatch(setRightOverlayMode('disappearing-messages'));
} else {
dispatch(setRightOverlayMode('panel-settings'));
@ -131,16 +131,16 @@ export const ConversationHeaderTitle = () => {
return (
<div className="module-conversation-header__title-container">
<div className="module-conversation-header__title-flex">
<div
className="module-conversation-header__title"
onClick={handleRightPanelToggle}
role="button"
>
<div className="module-conversation-header__title">
{isMe ? (
<span>{i18n('noteToSelf')}</span>
<span onClick={handleRightPanelToggle} role="button">
{i18n('noteToSelf')}
</span>
) : (
<span
className="module-contact-name__profile-name"
onClick={handleRightPanelToggle}
role="button"
data-testid="header-conversation-name"
>
{convoName}

Loading…
Cancel
Save