Validate project filename (#1046)

This commit is contained in:
Alex Christoffer Rasmussen
2024-06-06 22:37:41 +02:00
committed by GitHub
parent edb48a2fc7
commit c2fa115946
7 changed files with 174 additions and 107 deletions
@@ -50,7 +50,8 @@ export default function ProjectCreateForm(props: ProjectCreateFromProps) {
const handleSubmitCreate = async (values: ProjectCreateFormValues) => {
try {
setError(null);
const filename = values.title?.trim();
const filename = values.title ?? 'untitled';
await createProject({
...values,