Rotary encoders to ensure 2 wheel robot goes straight!
Your while loop logic is incompatible with the conditions inside it. 

Your while loop is saying:


  as long as BOTH wheel encoders read
  less than clicks, execute the code
  inside


and your if statements are saying: 


  if any of the wheel encoders is greater or equal to clicks, stop 
  the corresponding motor


This is generally false except for the rare condition where one of the encoders happen to increment between the arduino evaluating the while and the if statements. In order words just about never.

So the first thing you need to do is fix your logic. Then you need to investigate more sophisticated means of keeping the wheels in sync, such as computing an error term from the different in ticks, and employing a PID controller algorithm to adjust the speed of both motors via analogWrite.