Whoever desires the life of this world and its adornments - We fully repay them for their deeds therein, and they therein will not be deprived.
[Qur’aan 11:15]
Those people who do good deeds to show off their deeds, get repaid for their deeds in this world.
When the world is the main goal of a person and he seeks only it, then Allah repays him his reward in this world. Then when the person returns to the next world, he has no good deeds left by means of which he can get any reward.
As for the believer, who does every good deed only to please Allah and has no other purpose, then he gets rewarded both in this world and in the next world.
**Al-Walid bin Abi Al-Wald abu 'Utthman Al-Mada’ini narrated that 'Uqbah bin Muslim narrated to him, that shufaiy Al-Asbahi narrated that he entered Al-Madinah and saw a man around whom the people had gathered. He asked:
“Who is this?” They said: “Abu Hurairah.” (He said):So I got close to him until I was sitting in front of him as he was narrating to the people. When he was silent and alone, I said to him: " I ask you absolute truth if you would narrate to me a Hadith which you heard from the Messenger of Allah (sallallaahu 'alayhi wa sallam), That you understand and know."
So Abu Hurairah said: “You want me to narrate a Hadith to you which the Messenger of Allah (sallallaahu 'alayhi wa sallam) narrated to me that I understand and know.” Then Abu Hurairah began sobbing profusely.
We sat for a while, then he recovered and said: “I shall narrate to you a Hadith which the Messenger of Allah (sallallaahu 'alayhi wa sallam) narrated in this House, while there was no one with us other than he and I.” Then, again, Abu Hurairah began sobbing severely. Then he recovered, and wiped his face, and said: “you want me to narrate to you a Hadith which the Messenger of Allah (sallallaahu 'alayhi wa sallam) narrated while he and I were sitting in this House, and no one was with us but he and I.” Then Abu Hurairah began sobbing severely. Then he bent, falling on his face, so I supported him for a long time. Then he recovered and said:
“The Messenger of Allah narrated to me that on the Day of Judgment, Allah, Most High, will descend to His slaves to judge between them. Every nation shall be kneeling. The first of those who will be called before him will be a man who memorized the Qur’an, and a man who was killed in Allah’s cause, and a wealthy man. Allah will say to the reciter: 'Did I not teach you what I revealed to My Messenger?”
He says: ‘Of course O Lord!’
He says: ‘Then what did you do with what you learned?’ He said: ‘I would stand (in prayer reciting) with it during all hours of the night and all hours of the day.’ Then Allah would say to him: ‘You have lied.’ And the angels will say: ‘You have lied.’
Allah will say to him: 'Rather, you wanted it to be said that so-and-so is a reciter.
And that was said.’ The person with the wealth will be brought, and Allah will say to him: ‘Was I not so generous with you, such that I did not leave you having any need from anyone?’ He will say: ‘Of course O Lord!’ He says: ‘Then what did you do with what I gave to you?’ He says: ‘I would nurture the ties of kinship and give charity.’
Then Allah will say to him: ‘You have lied.’ And the angels will say to him: ‘You have lied.’ Allah, Most High, will say: ‘Rather, you wanted it to be said that so-and-so is so generous, and that was said.’
Then the one who was killed in Allah’s cause shall be brought, and Allah will say to him : ‘For what were you killed?’ So he says: ‘I was commanded to fight in Your cause ,so I fought until I was killed.’ Allah [Most High] will say to him: ‘You have lied.’ And the angels will say to him: ‘You have lied.’
Allah [Most High] will say: ‘Rather, you wanted it be said that so-and-so is brave, and that was said.’
“Then the Messenger of Allah (sallallaahu 'alayhi wa sallam) hit me on my knees and said: ‘O Abu Hurairah! These first three are the creatures of Allah with whom the fire will be enflamed on the Day of Judgment.’”
Al-Walid Abu 'Uthman Al-Mada’ini said: “So 'Uqbah bin Muslim informed me that Shaufaiy, is the one who entered upon Mu’awiyah to inform him about this.” Abu Uthman said: 'This has been done with these people, then how about with those who remain among the people?"
Then Mu’awiyah begin weeping so intensely, that we thought that he will kill himself with excessive weeping. We said: “This man came to us to cause evil.” Then Mu’awiyah recovered, wiped off his face and said: "Allah and His Messenger told the truth:
Whosoever desires the life of the world and its glitter, then we shall pay in full (the wages of) their deeds therein, and they shall have no diminution therein.
They are those for whom there is nothing in the Hereafter Fire, and vain are the deeds they did therein. And of no effect is that which they used to do."
[Jaami’ Al-Tirmidhi Hadith No. 2382]
**