fix(viewer): 💚 Attempt to fix LP rewrites
This commit is contained in:
@ -30,7 +30,7 @@ export const EditableUrl = ({
|
||||
onSubmit={onPublicIdChange}
|
||||
>
|
||||
<HStack spacing={1}>
|
||||
<Text>https://</Text>
|
||||
<Text>{process.env.NEXT_PUBLIC_VIEWER_HOST}/</Text>
|
||||
<Tooltip label="Edit">
|
||||
<EditablePreview
|
||||
mx={1}
|
||||
@ -43,15 +43,15 @@ export const EditableUrl = ({
|
||||
fontWeight="semibold"
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
<EditableInput px={2} />
|
||||
|
||||
<Text>.typebot.io/</Text>
|
||||
</HStack>
|
||||
|
||||
<HStack>
|
||||
<EditButton size="xs" />
|
||||
<CopyButton size="xs" textToCopy={`https://${publicId}.typebot.io/`} />
|
||||
<CopyButton
|
||||
size="xs"
|
||||
textToCopy={`${process.env.NEXT_PUBLIC_VIEWER_HOST}/${publicId}`}
|
||||
/>
|
||||
</HStack>
|
||||
</Editable>
|
||||
)
|
||||
|
@ -4,7 +4,6 @@ import {
|
||||
PublicBlock,
|
||||
PublicStep,
|
||||
PublicTypebot,
|
||||
Step,
|
||||
Typebot,
|
||||
} from 'models'
|
||||
import shortId from 'short-uuid'
|
||||
@ -17,10 +16,15 @@ import { isDefined } from '@udecode/plate-common'
|
||||
export const parseTypebotToPublicTypebot = (
|
||||
typebot: Typebot
|
||||
): PublicTypebot => ({
|
||||
...typebot,
|
||||
id: shortId.generate(),
|
||||
typebotId: typebot.id,
|
||||
blocks: parseBlocksToPublicBlocks(typebot.blocks),
|
||||
edges: typebot.edges,
|
||||
name: typebot.name,
|
||||
publicId: typebot.publicId,
|
||||
settings: typebot.settings,
|
||||
theme: typebot.theme,
|
||||
variables: typebot.variables,
|
||||
})
|
||||
|
||||
const parseBlocksToPublicBlocks = (blocks: Block[]): PublicBlock[] =>
|
||||
|
Reference in New Issue
Block a user