Skip to content

Commit

Permalink
fix(editor): 🐛 Publish button sync
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Feb 15, 2022
1 parent 67ccf07 commit adf99ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/builder/services/publicTypebot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const parseTypebotToPublicTypebot = (
variables: typebot.variables,
})

const parseBlocksToPublicBlocks = (blocks: Block[]): PublicBlock[] =>
export const parseBlocksToPublicBlocks = (blocks: Block[]): PublicBlock[] =>
blocks.map((b) => ({
...b,
steps: b.steps.map(
Expand Down
5 changes: 2 additions & 3 deletions apps/builder/services/typebots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
import { deepEqual } from 'fast-equals'
import { stringify } from 'qs'
import { isChoiceInput, isConditionStep, sendRequest } from 'utils'
import { parseBlocksToPublicBlocks } from './publicTypebot'

export const useTypebots = ({
folderId,
Expand Down Expand Up @@ -223,9 +224,7 @@ export const checkIfPublished = (
typebot: Typebot,
publicTypebot: PublicTypebot
) =>
deepEqual(typebot.blocks, publicTypebot.blocks) &&
typebot.name === publicTypebot.name &&
typebot.publicId === publicTypebot.publicId &&
deepEqual(parseBlocksToPublicBlocks(typebot.blocks), publicTypebot.blocks) &&
deepEqual(typebot.settings, publicTypebot.settings) &&
deepEqual(typebot.theme, publicTypebot.theme)

Expand Down

4 comments on commit adf99ac

@vercel
Copy link

@vercel vercel bot commented on adf99ac Feb 15, 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:

docs – ./apps/docs

docs.typebot.io
docs-typebot-io.vercel.app
docs-git-main-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on adf99ac Feb 15, 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

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

@vercel
Copy link

@vercel vercel bot commented on adf99ac Feb 15, 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 adf99ac Feb 15, 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:

viewer-v2 – ./apps/viewer

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

Please sign in to comment.