Stay connected popup

I’m using okta with react
'm looking for a way to implement a “stay connected popup” with okta sdk.

By that I mean to a popup that lets the user know that he was inactive for 30 minutes, with 2 buttons: logout and stay connected.

How can I use the sdk, to extend the user’s session with another 2 hours?

Currently with the router wrapping, the user is being redirected to login page only when he refreshes the page