My xterm readline console twice in every Enter

Codesandbox

Hi, I am making a terminal like Command Prompt in Windows. I am using react-xterm and xterm-readline. But the problem is when I press Enter it shows output and then it writes a new prompt as before. And then it goes to the new prompt. It’s not like normal behavior. Where the problem is?