That there was an eclipse of the sun and the Prophet of Allah (ﷺ) prayed two rak'ahs until it ended. Then he said: "The sun and the moon do not become eclipsed for the death of anyone, but they are two of His creations. Allah, the Mighty and Sublime, causes whatever He wants to happen in His creation. If Allah (SWT), the Mighty and Sublime, manifests Himself to any of His creation, it humbles itself before Him, so if either of them (solar or lunar eclipse) happens, pray until it is over or until Allah causes something to happen."
Reference: Sunan an-Nasa'i 1487 In-book : Book 16, Hadith 29 English translation : Vol. 2, Book 16, Hadith 1488
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.