change(ui) - close right panel on clicking the same tab

This commit is contained in:
Shekar Siri 2022-08-26 18:23:09 +02:00
parent a813a00b6d
commit a75bcd1af2

View file

@ -151,8 +151,13 @@ export default class PlayerBlockHeader extends React.PureComponent {
tabs={TABS}
active={activeTab}
onClick={(tab) => {
setActiveTab(tab);
!showEvents && toggleEvents(true);
if (activeTab === tab) {
setActiveTab('');
toggleEvents();
} else {
setActiveTab(tab);
!showEvents && toggleEvents(true);
}
}}
border={false}
/>