ant-design / ant-design-pro

👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
https://pro.ant.design
MIT License
36.4k stars 8.14k forks source link

🐛 [BUG] Nested Layout props children undefined #11280

Open xXAvoraXx opened 3 months ago

xXAvoraXx commented 3 months ago

The {children} property always returns undefined even though I'm trying the same thing as written here.

https://pro.ant.design/docs/layout#nested-layout

  {
    exact: false,
    path: '/settings',
    component: './Settings/index', // my nested layout page
    routes: [
      {
        exact: true,
        name: 'profile',
        path: '/settings/profile',
        component: './Settings/sub-pages/Profile/index',
      },
      {
        exact: true,
        name: 'appearance',
        path: '/settings/appearance',
        component: './Settings/sub-pages/Appearance/index',
      },
    ],
  },
xXAvoraXx commented 3 months ago

I Found this solution, someone merge this --> https://github.com/ant-design/ant-design-pro-site/pull/642