2
0
Files
bot/apps/builder/components/shared/buttons/PublishButton.tsx

19 lines
429 B
TypeScript
Raw Normal View History

import { Button } from '@chakra-ui/react'
2021-12-23 16:31:56 +01:00
import { useTypebot } from 'contexts/TypebotContext'
export const PublishButton = () => {
2021-12-23 16:31:56 +01:00
const { isPublishing, isPublished, publishTypebot } = useTypebot()
return (
2021-12-23 16:31:56 +01:00
<Button
ml={2}
colorScheme="blue"
isLoading={isPublishing}
isDisabled={isPublished}
onClick={publishTypebot}
>
{isPublished ? 'Published' : 'Publish'}
</Button>
)
}