Praise be to Allaah.
Talaaq that takes place during the period of purity following
menses in which the husband had intercourse with a wife is valid according
to the majority of scholars, although some of them were of the view that it
does not count. But as the divorce was done through the sharee’ah courts, it
is a valid divorce and you have the right to remarry once the ‘iddah has
ended. If you have any problems then refer to the sharee’ah court.
And Allaah knows best.