mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-02 01:45:52 +02:00
fix(projects): disable create while the team selection is invalid
The inline at-least-one-team hint showed red while the Create button stayed clickable (toast on click). Invalid state now disables the button, matching the empty-title condition; the submit-time toast stays as the server-rule backstop. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
committed by
Jiayuan Zhang
parent
b8f393cce7
commit
cccb146a98
@@ -881,7 +881,7 @@ export function CreateProjectModal({ onClose }: { onClose: () => void }) {
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={handleSubmit}
|
||||
disabled={!title.trim() || submitting}
|
||||
disabled={!title.trim() || submitting || (teams.length > 0 && teamIds.length === 0)}
|
||||
className="shrink-0"
|
||||
>
|
||||
{submitting ? t(($) => $.create_project.submitting) : t(($) => $.create_project.submit)}
|
||||
|
||||
Reference in New Issue
Block a user