openreplay/frontend/app/components/Session/RightBlock.tsx
Андрей Бабушкин b822b1c067 applied eslint
2025-02-26 20:31:01 +01:00

47 lines
1.2 KiB
TypeScript

import React from 'react';
import TagWatch from 'Components/Session/Player/TagWatch';
import cn from 'classnames';
import EventsBlock from '../Session_/EventsBlock';
import HighlightPanel from '../Session_/Highlight/HighlightPanel';
import PageInsightsPanel from '../Session_/PageInsightsPanel/PageInsightsPanel';
import stl from './rightblock.module.css';
function RightBlock({
activeTab,
setActiveTab,
}: {
activeTab: string;
setActiveTab: (tab: string) => void;
}) {
switch (activeTab) {
case 'EVENTS':
return (
<div className={cn('flex flex-col border-l', stl.panel)}>
<EventsBlock setActiveTab={setActiveTab} />
</div>
);
case 'CLICKMAP':
return (
<div className={cn('flex flex-col bg-white border-l', stl.panel)}>
<PageInsightsPanel setActiveTab={setActiveTab} />
</div>
);
case 'INSPECTOR':
return (
<div className={cn('bg-white border-l', stl.panel)}>
<TagWatch />
</div>
);
case 'HIGHLIGHT':
return (
<div className={cn('bg-white border-l', stl.panel)}>
<HighlightPanel onClose={() => setActiveTab('')} />
</div>
);
default:
return null;
}
}
export default RightBlock;