图像未显示在 React js 功能组件的嵌套花括号中

Image is not shown in nested curly braces in react js functional component

function Adding()
{
 const [y, Sety] = useState('');
return(
<>
.
.
{ x !== '' && (
          <img src={add} alt="Add" onClick={() => Sety(y + 1)} onKeyDown={() => Sety(y + 1)} />, 'Add'
        )
}
.
.
</>
);
}

我正在调用 API 然后我设置 x.It 的值工作正常。只有当值不是 '' 时,Add 才可见。但是图像 'add' 不可见。 编译时我没有收到任何错误。图像添加导入如下: import add from './add.png'

{ x !== '' && (
     <div>
          <img src={add} alt="Add" onClick={() => Sety(y + 1)} onKeyDown={() => Sety(y + 1)} />
        Add
     </div>
        )
}

在 div 标签内包含图像和文本对我有用。