completed change previous item
reduce next.js.erb codes