diff --git a/cypress/e2e/notebooks.cy.ts b/cypress/e2e/notebooks.cy.ts index dfb50b2e50050..d44555d42294e 100644 --- a/cypress/e2e/notebooks.cy.ts +++ b/cypress/e2e/notebooks.cy.ts @@ -34,7 +34,7 @@ describe('Notebooks', () => { }) it('Insertion suggestions can be dismissed', () => { - cy.visit(urls.notebookEdit('h11RoiwV')) + cy.visit(urls.notebook('h11RoiwV')) cy.get('.NotebookEditor').type('{enter}') cy.get('.NotebookRecordingTimestamp--preview').should('exist') diff --git a/frontend/src/models/notebooksModel.ts b/frontend/src/models/notebooksModel.ts index 6ac02bae2e24f..ec6957e38f0c4 100644 --- a/frontend/src/models/notebooksModel.ts +++ b/frontend/src/models/notebooksModel.ts @@ -40,7 +40,7 @@ export const openNotebook = async ( if (popoverLogic?.values.visibility === 'visible') { popoverLogic?.actions.selectNotebook(notebookId) } else { - router.actions.push(urls.notebookEdit(notebookId)) + router.actions.push(urls.notebook(notebookId)) } popoverLogic?.actions.setInitialAutofocus(focus) diff --git a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx index 9a13bef4e9dc0..7d9f53cb42bd4 100644 --- a/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx +++ b/frontend/src/scenes/notebooks/Notebook/NotebookPopover.tsx @@ -45,7 +45,7 @@ export function NotebookPopover(): JSX.Element { } }, [ref.current]) - const isEditable = visibility !== 'hidden' && !notebook?.is_template + const editable = visibility !== 'hidden' && !notebook?.is_template return (
)} diff --git a/frontend/src/scenes/notebooks/NotebookScene.tsx b/frontend/src/scenes/notebooks/NotebookScene.tsx index 99bbea23881d1..fc46050a2300a 100644 --- a/frontend/src/scenes/notebooks/NotebookScene.tsx +++ b/frontend/src/scenes/notebooks/NotebookScene.tsx @@ -4,7 +4,6 @@ import { notebookLogic } from './Notebook/notebookLogic' import { Notebook } from './Notebook/Notebook' import { NotFound } from 'lib/components/NotFound' import { NotebookSceneLogicProps, notebookSceneLogic } from './notebookSceneLogic' -import { NotebookMode } from '~/types' import { LemonButton, LemonTag } from '@posthog/lemon-ui' import { notebookPopoverLogic } from './Notebook/notebookPopoverLogic' import { NotebookExpandButton, NotebookSyncInfo } from './Notebook/NotebookMeta' @@ -32,8 +31,7 @@ export const scene: SceneExport = { } export function NotebookScene(): JSX.Element { - const { notebookId, mode } = useValues(notebookSceneLogic) - const { setNotebookMode } = useActions(notebookSceneLogic) + const { notebookId } = useValues(notebookSceneLogic) const { notebook, notebookLoading, conflictWarningVisible } = useValues(notebookLogic({ shortId: notebookId })) const { exportJSON } = useActions(notebookLogic({ shortId: notebookId })) const { selectNotebook, setVisibility } = useActions(notebookPopoverLogic) @@ -65,13 +63,13 @@ export function NotebookScene(): JSX.Element { ) } - const editEnabled = !notebook?.is_template + const isTemplate = notebook?.is_template return (