Sunan an-Nasa'i
It was narrated from An-Nu'man bin Bashir that : The Prophet (ﷺ) said: "If there is an eclipse of the sun or the moon, pray like the last obligatory prayer you did before that."
أَخْبَرَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، عَنْ مُعَاذِ بْنِ هِشَامٍ، قَالَ حَدَّثَنِي أَبِي، عَنْ قَتَادَةَ، عَنْ أَبِي قِلاَبَةَ، عَنِ النُّعْمَانِ بْنِ بَشِيرٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " إِذَا خَسَفَتِ الشَّمْسُ وَالْقَمَرُ فَصَلُّوا كَأَحْدَثِ صَلاَةٍ صَلَّيْتُمُوهَا " .
Grade: Da'if (Darussalam)
Reference