Refactor the modals for details page