@ -3,7 +3,7 @@ import {
|
||||
getExistingResultFromSession,
|
||||
setResultInSession,
|
||||
} from '@/utils/sessionStorage'
|
||||
import Bot from '@typebot.io/react'
|
||||
import { Standard } from '@typebot.io/react'
|
||||
import { BackgroundType, InitialChatReply, Typebot } from 'models'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
@ -38,6 +38,7 @@ export const TypebotPageV2 = ({ url, typebot }: TypebotPageV2Props) => {
|
||||
}, [asPath, push, typebot.settings.general.isHideQueryParamsEnabled])
|
||||
|
||||
useEffect(() => {
|
||||
console.log(open)
|
||||
clearQueryParamsIfNecessary()
|
||||
}, [clearQueryParamsIfNecessary])
|
||||
|
||||
@ -89,10 +90,7 @@ export const TypebotPageV2 = ({ url, typebot }: TypebotPageV2Props) => {
|
||||
metadata={typebot.settings.metadata}
|
||||
/>
|
||||
{initialChatReply && (
|
||||
<Bot.Standard
|
||||
typebotId={typebot.id}
|
||||
initialChatReply={initialChatReply}
|
||||
/>
|
||||
<Standard typebotId={typebot.id} initialChatReply={initialChatReply} />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
@ -6,7 +6,11 @@ import { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
await cors(req, res, {
|
||||
origin: ['https://docs.typebot.io', 'http://localhost:3005'],
|
||||
origin: [
|
||||
'https://docs.typebot.io',
|
||||
'http://localhost:3005',
|
||||
'http://localhost:3006',
|
||||
],
|
||||
})
|
||||
|
||||
return createOpenApiNextHandler({
|
||||
|
Reference in New Issue
Block a user