Hypothyroidism and pregnancy

Anyone had hypothyroidism and had a successful pregnancy? How long were you ttc before getting pregnant? I found out I had hypothyroidism at my initial prenatal appointment. Unfortunately that pregnancy ended in miscarriage. Just looking for some advice/guidance/counsel