Skip to content

Commit

Permalink
fix(editor): πŸš‘οΈ Preview panel not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 5, 2022
1 parent a6a2fcc commit 8f36516
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/builder/pages/typebots/[typebotId]/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { Flex } from '@chakra-ui/layout'
import { Seo } from 'components/Seo'
import { TypebotHeader } from 'components/shared/TypebotHeader'
import { EditorContext, RightPanel, useEditor } from 'contexts/EditorContext'
import {
EditorContext,
RightPanel as RightPanelEnum,
useEditor,
} from 'contexts/EditorContext'
import React from 'react'
import { KBar } from 'components/shared/KBar'
import { BoardMenuButton } from 'components/editor/BoardMenuButton'
Expand All @@ -15,7 +19,6 @@ import { GettingStartedModal } from 'components/editor/GettingStartedModal'

const TypebotEditPage = () => {
const { typebot, isReadOnly } = useTypebot()
const { rightPanel } = useEditor()

return (
<EditorContext>
Expand All @@ -41,7 +44,7 @@ const TypebotEditPage = () => {
>
{typebot && <Graph flex="1" typebot={typebot} />}
<BoardMenuButton pos="absolute" right="40px" top="20px" />
{rightPanel === RightPanel.PREVIEW && <PreviewDrawer />}
<RightPanel />
</GraphProvider>
</GraphDndContext>
</Flex>
Expand All @@ -50,4 +53,9 @@ const TypebotEditPage = () => {
)
}

const RightPanel = () => {
const { rightPanel } = useEditor()
return rightPanel === RightPanelEnum.PREVIEW ? <PreviewDrawer /> : <></>
}

export default TypebotEditPage

4 comments on commit 8f36516

@vercel
Copy link

@vercel vercel bot commented on 8f36516 Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8f36516 Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

landing-page-v2 – ./apps/landing-page

landing-page-v2-typebot-io.vercel.app
www.get-typebot.com
www.typebot.io
typebot.io
landing-page-v2-git-main-typebot-io.vercel.app
get-typebot.com

@vercel
Copy link

@vercel vercel bot commented on 8f36516 Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app
app.typebot.io

@vercel
Copy link

@vercel vercel bot commented on 8f36516 Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.