Clear Navigation Stack history

I have to clear stack and want to navigate to fisrt page of the App.
Below is the scenario

LoginPage → BottomTabs (Home, About, Profile,Cart),
When logged successfully creating Home Page as a root page.
from Home Page → PLP page → PDP page

Here from pdp page i want to go back to login page. How to achieve this.
I am using Ionic+React v8.0.0
for navigation i am using useIonRouter .