Hi Hena To is optional in your sentence but since the sentence is quite long, I would keep it. You have a form of to be (was) before the infinitive and to is often omitted in such cases: The first thing we did was [to] call him. "All I Have To Do Is [To] Dream" - An Everly Brothers song CB
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
So it would be grammatically wrong if I said "All she did was crying alone in her room the whole day." ?Yes. That would be wrong.