File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/app/src/app/pages/Dashboard/Content Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -57,9 +57,15 @@ export const Content = withRouter(({ history }) => {
5757 } ) }
5858 >
5959 < Switch >
60- { isFeatureFlagBeta && (
61- < Route path = "/dashboard/beta" component = { BetaRepositoriesPage } />
62- ) }
60+ < Route
61+ path = "/dashboard/beta"
62+ /**
63+ * Wrap the component instead of the whole route, as the
64+ * feature-flag query takes a few ms to load, and meanwhile the Route
65+ * redirect the page because the route hasn't been registered yet
66+ */
67+ component = { isFeatureFlagBeta ? BetaRepositoriesPage : ( ) => null }
68+ />
6369 < Route path = "/dashboard/home" component = { Home } />
6470 < Route path = "/dashboard/drafts" component = { Drafts } />
6571 < Route path = "/dashboard/all/:path*" component = { All } />
You can’t perform that action at this time.
0 commit comments