react

조건부 렌더링

cghun 2021. 11. 30. 16:41
{(!terms.useOfInfo || !terms.notice) && <button className="bg-gray-500 rounded-lg w-full text-white py-2.5" onClick={handleCreateClicked} disabled >
 확인 </button>}

{terms.useOfInfo && terms.notice && <button className="bg-gray-800 rounded-lg w-full text-white py-2.5" onClick={handleCreateClicked} >
확인 </button>}