'Stop redirecting to login page

I have protected library page by protected route of react router dom using requiredAuth function but it is redirecting to login page if page is refreshed



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source