Following a national plebiscite in July 1937, the new Constitution of Ireland  came into force on 29 December 1937. This replaced the Constitution of the Irish Free State and called the state Ireland, or Éire in Irish. While Articles 2 and 3 of the Constitution defined the national territory to be the whole island, they also confined the state's jurisdiction to the area that had been the Irish Free State. The former Irish Free State government had abolished the Office of Governor-General in December 1936. Although the constitution established the office of President of Ireland, the question over whether Ireland was a republic remained open. Diplomats were accredited to the king, but the president exercised all internal functions of a head of state. For instance, the President gave assent to new laws with his own authority, without reference to King George VI who was only an "organ", that was provided for by statute law. Ireland remained neutral during World War II, a period it described as the Emergency. Ireland's link with the Commonwealth was terminated with the passage of the Republic of Ireland Act 1948, which came into force on 18 April 1949 and declared that the state was a republic. At the time, a declaration of a republic terminated Commonwealth membership. This rule was changed 10 days after Ireland declared itself a republic, with the London Declaration of 28 April 1949. Ireland did not reapply when the rules were altered to permit republics to join. Later, the Crown of Ireland Act was repealed in Ireland by the Statute Law Revision  Act 1962.
Question: What happened second: new Constitution of Ireland or Ireland declared itself a republic?
Answer: Ireland declared itself a republic