2
0

🚸 (publish) Improve invalid public ID feedback

Also remove the 4 char min length rule for self-hosted versions

Closes #267
This commit is contained in:
Baptiste Arnaud
2023-01-20 11:20:11 +01:00
parent fe2952d407
commit 0febaf9760
9 changed files with 68 additions and 29 deletions

View File

@ -261,10 +261,9 @@ export const TypebotProvider = ({
await saveTypebot()
}
if (!publishedTypebot) {
const newPublicId = parseDefaultPublicId(
localTypebot.name,
localTypebot.id
)
const newPublicId =
localTypebot.publicId ??
parseDefaultPublicId(localTypebot.name, localTypebot.id)
updateLocalTypebot({ publicId: newPublicId, publishedTypebotId })
newLocalTypebot.publicId = newPublicId
await saveTypebot()