diff --git a/apps/builder/src/components/NewVersionPopup.tsx b/apps/builder/src/components/NewVersionPopup.tsx index 11e994e9f..6258bd003 100644 --- a/apps/builder/src/components/NewVersionPopup.tsx +++ b/apps/builder/src/components/NewVersionPopup.tsx @@ -1,14 +1,13 @@ import { useTypebot } from '@/features/editor' -import { HStack, Stack, Text } from '@chakra-ui/react' +import { Button, Flex, HStack, Stack, Text } from '@chakra-ui/react' import { useEffect, useState } from 'react' import { sendRequest } from 'utils' import { PackageIcon } from './icons' -import { MotionStack } from './MotionStack' -const intervalDuration = 1000 * 30 // 30 seconds +const intervalDuration = 1000 * 60 // 30 seconds export const NewVersionPopup = () => { - const { save } = useTypebot() + const { typebot, save } = useTypebot() const [currentVersion, setCurrentVersion] = useState() const [isNewVersionAvailable, setIsNewVersionAvailable] = useState(false) const [isReloading, setIsReloading] = useState(false) @@ -46,35 +45,40 @@ export const NewVersionPopup = () => { if (!isNewVersionAvailable) return null return ( - - - - Typebot is ready to update! - - Click to restart - + + + + {' '} + New version available! + + + + An improved version of Typebot is available. Please reload now to + upgrade. + + + + + - + ) }