react why is my component mounting twice