2
0

feat: Add new onboarding flow

This commit is contained in:
Baptiste Arnaud
2022-03-23 09:56:39 +01:00
parent f9aba27aae
commit f4e6f63b26
32 changed files with 1115 additions and 89 deletions

View File

@ -1,18 +1,23 @@
import { Button, ButtonProps, Text, VStack } from '@chakra-ui/react'
import { PlusIcon } from 'assets/icons'
import { useRouter } from 'next/router'
import { stringify } from 'qs'
import React from 'react'
export const CreateBotButton = ({
folderId,
isFirstBot,
...props
}: { folderId?: string } & ButtonProps) => {
}: { folderId?: string; isFirstBot: boolean } & ButtonProps) => {
const router = useRouter()
const handleClick = () =>
folderId
? router.push(`/typebots/create?folderId=${folderId}`)
: router.push('/typebots/create')
router.push(
`/typebots/create?${stringify({
isFirstBot: !isFirstBot ? undefined : isFirstBot,
folderId,
})}`
)
return (
<Button