spotty-amberS
Refine4y ago
6 replies
spotty-amber

TypeError Cannot read properties of undefined (reading 'pathname')

I have create a new project using a superplate cmd and it was working fine until I added my custom dashboard page. Whenever I add a dashboard page in reine component in app.tsx I get an error of TypeError: Cannot read properties of undefined (reading 'pathname') and when I remove the dashboard page it works fine.

After digging for a while I figured out that the error is caused by the custom sider components that is present on layout generated by superplaate cmd. What is the issue here exactly can someone help me fix this. I have replicated the same issue in stackblitz and the link is here
https://stackblitz.com/edit/refinedev-refine-m2u1fh?file=src/App.tsx
Run official live example code for Refine Antd, created by Refinedev on StackBlitz
Refine Antd Example (forked) - StackBlitz
Was this page helpful?