Article 50 has not yet been triggered, and if the court case concludes that Parliamentary consent is required or the other court case concludes that it would contravene the Good Friday Agreement, then it probably won't be. The referendum itself is not binding.