The United Nations did not establish a joint state between Palestine and Israel. They proposed two states (plus UN-controlled Jerusalem), but the Arab League and the Palestinian Arabs rejected it.
That was 1947, not 1948.
While a substantial number of Palestinians left the territory prior to Israel's declaration of independence, two to three times as many left Israel after the declaration. There was also a forced exodus of Jews from Arab states.
Israel established itself on the day of the end of the British Mandate of Palestine. The Arabs declared war and attacked the day after.
Hamas is a brutal group with no respect for their own citizenry - the label of them as a terrorist group can only be denied by the most one-sided of viewers.
That does not absolve Israel of its crimes against humanity, just points out that Hamas are not the good guys here, even if Israel is not always there, either.
I have more hope that Israel will come around than that Hamas will, but I am not holding my breath for either.