Right. The integrand will have to be integrated piecewise over intervals on which \(\displaystyle x\) is a one-to-one function of \(\displaystyle t\) as
\(\displaystyle \displaystyle\int_{x=-2}^{x=2}y\frac{\mathrm dx}{\mathrm dt}\,\mathrm dt\ =\ \int_{x=-2}^{x=-\frac2{\sqrt3}}y\frac{\mathrm dx}{\mathrm dt}\,\mathrm dt\,+\,\int_{x=-\frac2{\sqrt3}}^{x=\frac2{\sqrt3}}y\frac{\mathrm dx}{\mathrm dt}\,\mathrm dt\,+\,\int_{x=\frac2{\sqrt3}}^{x=2}y\frac{\mathrm dx}{\mathrm dt}\,\mathrm dt\)