change(ui): prevent autoplay for in session click map

This commit is contained in:
nick-delirium 2023-02-08 16:53:20 +01:00
parent 08c51a0b4a
commit 61210506d4
2 changed files with 3 additions and 9 deletions

View file

@ -75,12 +75,6 @@ function LivePlayer({
}
}, []);
const TABS = {
EVENTS: 'User Steps',
CLICKMAP: 'Click Map',
};
const [activeTab, setActiveTab] = useState('');
if (!contextValue.player) return null;
return (
@ -89,8 +83,6 @@ function LivePlayer({
<PlayerBlockHeader
// @ts-ignore
activeTab={activeTab}
setActiveTab={setActiveTab}
tabs={TABS}
isMultiview={openedFromMultiview}
/>
)}

View file

@ -69,7 +69,9 @@ function WebPlayer(props: any) {
const isPlayerReady = contextValue.store?.get().ready
React.useEffect(() => {
contextValue.player && contextValue.player.play()
if (activeTab !== 'Click Map') {
contextValue.player && contextValue.player.play()
}
}, [insights, isPlayerReady, jumpTimestamp])
// LAYOUT (TODO: local layout state - useContext or something..)