Milk Protein Allergy

For those of you who breastfeed an have baby’s with milk protein allergy’s an had to cut out dairy how long did you leave it out of your diet the whole time or just till your baby turned a certain age ?