Description
The current implementation in pages/_app.tsx has several potential issues:
- Direct access to
location without checking for the window object.
- Missing cleanup function in the
useEffect hook.
- Not using Next.js
router for path detection.
References