mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 16:31:13 -05:00
Refactor: Make title truly optional
This commit is contained in:
@@ -78,14 +78,6 @@ export function UppyPhotoSubmissionUpload({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!title.trim()) {
|
|
||||||
toast({
|
|
||||||
variant: 'destructive',
|
|
||||||
title: 'Title Required',
|
|
||||||
description: 'Please provide a title for your photo submission.',
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setIsSubmitting(true);
|
setIsSubmitting(true);
|
||||||
|
|
||||||
@@ -298,7 +290,7 @@ export function UppyPhotoSubmissionUpload({
|
|||||||
|
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="title" className="text-base font-medium">
|
<Label htmlFor="title" className="text-base font-medium">
|
||||||
Title
|
Title <span className="text-muted-foreground">(optional)</span>
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
id="title"
|
id="title"
|
||||||
@@ -366,7 +358,7 @@ export function UppyPhotoSubmissionUpload({
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
disabled={isSubmitting || !title.trim() || photos.length === 0}
|
disabled={isSubmitting || photos.length === 0}
|
||||||
className="w-full h-12 text-base font-medium photo-upload-trigger"
|
className="w-full h-12 text-base font-medium photo-upload-trigger"
|
||||||
size="lg"
|
size="lg"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user