Constraining twin stars with GW170817