On the contrary, it was the right thing to say in order to boost morale and try to influence the outcome of the war.
Ukrainians, even though currently poor and corrupted, in our minds belong to Europe. It is just a question of time when it happens that Ukraine joins the EU.
Well, the narrative is that Euromaidan was a coup by US and EU because Ukraine's gov refused to sign an association treaty with EU... So if the EU Commission says that "Ukraine belongs in EU, we want them in" then Putin can claim "I told you so" and you cannot dismiss this by simply saying that no-one believes him anymore...
Hence it was not a smart thing for Von Der Leyen to say.
This rubbish was believed only in fringe circles and probably only because of Russian propaganda.
Putin also said that he is attacking Ukraine to de-nazify it. It makes no sense hence his further claims will not be believed to be a reflection of reality but only as his state of mind.
russia's been rattlin' some sabers but it looks like the sabers aren't so sharp. best time for EU to grab as much as it can to ensure its security against a aggressive foreign adversary. Heck the outcome of this whole war may end up with EU owning Russia west of the urals.