The Messenger of Allah ﷺ said, "Whoever composes a line of poetry after the final evening prayer, his prayer for that night will not be accepted."
حدثنا يزيد بن هارون أخبرنا قزعة بن سويد الباهلي عن عاصم بن مخلد عن أبي الأشعث الصنعاني قال أبي حدثنا الأشيب فقال عن أبي عاصم الأحول عن أبي الأشعث
قال رسول الله ﷺ من قرض بيت شعر بعد العشاء الآخرة لم تقبل له صلاة تلك الليلة
No references are available.
Its isnad is daif, because of Qazaa bin Suwayd, whom the majority weakened, while Ahmad and Ibn Main deemed him reliable, and Haythami said the same thing in 1/315. This Suwayd's hadith may be graded hasan if it is corroborated or has a supporting witness. But here I did not find any witness or corroboration for it.