react router
refactored front-end js