only run when on commit page, clear variables from localstorage on nav away