fix(growth): add Cancel button to add form

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Manohar Gupta 2026-05-17 14:41:01 +05:30
parent 796b6d8004
commit dcb510964e

View file

@ -622,9 +622,14 @@ export default function GrowthPage() {
</button>
</>
) : (
<button onClick={() => handleAdd()} disabled={saving} className="w-full p-3 bg-rose-400 text-white rounded-xl disabled:opacity-50">
{saving ? "Saving..." : "Save"}
</button>
<>
<button onClick={() => handleAdd()} disabled={saving} className="flex-1 p-3 bg-rose-400 text-white rounded-xl disabled:opacity-50">
{saving ? "Saving..." : "Save"}
</button>
<button onClick={() => { setShowAdd(false); setWeight(""); setHeight(""); setHeadCircumference(""); }} className="flex-1 p-3 bg-gray-200 dark:bg-gray-700 rounded-xl">
Cancel
</button>
</>
)}
</div>
</div>