2
0

🐛 (results) Fix bug preventing user from seeing linked typebots results

This commit is contained in:
Baptiste Arnaud
2022-11-06 09:57:08 +01:00
parent 63845effaf
commit 6dd7bd9562
18 changed files with 234 additions and 151 deletions

View File

@ -29,12 +29,11 @@ export const EditableUrl = ({
const [value, setValue] = useState(pathname)
const handleSubmit = (newPathname: string) => {
if (/^[a-z]+(-[a-z]+)*$/.test(newPathname))
return onPathnameChange(newPathname)
if (/^[a-z0-9-]*$/.test(newPathname)) return onPathnameChange(newPathname)
setValue(pathname)
showToast({
title: 'Invalid ID',
description: 'Should contain only contain letters and dashes.',
description: 'Should contain only contain letters, numbers and dashes.',
})
}