From 0e1fa4e339aad615a2925f3b2ac6a56c8d0315c5 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Fri, 17 Feb 2023 16:30:02 +0100 Subject: [PATCH] :lipstick: Improve new version popup ui --- .../src/components/NewVersionPopup.tsx | 50 ++++++++++--------- 1 file changed, 27 insertions(+), 23 deletions(-) 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. + + + + + - + ) }