2
0

feat: 🔥 Remove save button

This commit is contained in:
Baptiste Arnaud
2022-02-21 19:02:44 +01:00
parent fd822a35a7
commit 1b900b3f5d
4 changed files with 53 additions and 62 deletions

View File

@ -37,7 +37,7 @@ export const GoogleSheetsSettingsBody = ({
onOptionsChange,
stepId,
}: Props) => {
const { save, hasUnsavedChanges } = useTypebot()
const { save } = useTypebot()
const { sheets, isLoading } = useSheets({
credentialsId: options?.credentialsId,
spreadsheetId: options?.spreadsheetId,
@ -83,10 +83,7 @@ export const GoogleSheetsSettingsBody = ({
}
const handleCreateNewClick = async () => {
if (hasUnsavedChanges) {
const errorToastId = await save()
if (errorToastId) return
}
await save()
const linkElement = document.createElement('a')
linkElement.href = getGoogleSheetsConsentScreenUrl(
window.location.href,