2
0
Files
bot/apps/builder/components/shared/buttons/PublishButton.tsx
Baptiste Arnaud 9fa4c7dffa ♻️ Normalize data
2022-01-06 09:40:56 +01:00

19 lines
444 B
TypeScript

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