diff --git a/services/web/frontend/js/features/ide-redesign/components/toolbar/toolbar.tsx b/services/web/frontend/js/features/ide-redesign/components/toolbar/toolbar.tsx index e9c05cbffc..ed1b2509ff 100644 --- a/services/web/frontend/js/features/ide-redesign/components/toolbar/toolbar.tsx +++ b/services/web/frontend/js/features/ide-redesign/components/toolbar/toolbar.tsx @@ -7,8 +7,31 @@ import ShareProjectButton from './share-project-button' import ChangeLayoutButton from './change-layout-button' import ShowHistoryButton from './show-history-button' import { LabsActions } from './labs-actions' +import { useLayoutContext } from '@/shared/context/layout-context' +import BackToEditorButton from '@/features/editor-navigation-toolbar/components/back-to-editor-button' +import { useCallback } from 'react' +import * as eventTracking from '../../../../infrastructure/event-tracking' export const Toolbar = () => { + const { view, setView } = useLayoutContext() + + const handleBackToEditorClick = useCallback(() => { + eventTracking.sendMB('navigation-clicked-history', { action: 'close' }) + setView('editor') + }, [setView]) + + if (view === 'history') { + return ( +