Using History.push to redirect when the last image disappears - React Functional Components

enter image description here

When the last image disappears, the page should be redirected to a loose page

Demo