openreplay/frontend/app/components/Session/RightBlock.tsx
Delirium ee46413b13
Events for E2E testing (#3081)
* ui: change export event ui, add rightblock panel

* ui: add timeline select checkbox

* ui: keep selected framework in localstorage

* ui: on timeline => on the timeline
2025-03-03 16:36:42 +01:00

54 lines
1.5 KiB
TypeScript

import React from 'react';
import EventsBlock from '../Session_/EventsBlock';
import HighlightPanel from "../Session_/Highlight/HighlightPanel";
import PageInsightsPanel from '../Session_/PageInsightsPanel/PageInsightsPanel';
import UnitStepsModal from "../Session_/UnitStepsModal";
import TagWatch from 'Components/Session/Player/TagWatch';
import cn from 'classnames';
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>
)
case 'EXPORT':
return (
<div className={cn('bg-white border-l', stl.extraPanel)}>
<UnitStepsModal onClose={() => setActiveTab('EVENTS')} />
</div>
)
default:
return null;
}
}
export default RightBlock;