Clicking back and forth changes states of app for index and topic