Skip to content

Commit

Permalink
fix: #2579 invite flow broken on prod (#2580)
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcvay authored Sep 7, 2020
1 parent c526406 commit 1b4950c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
1 change: 1 addition & 0 deletions packages/developer-portal/src/components/ui/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export type MenuProps = {}
export const Menu: React.FunctionComponent<MenuProps> = () => {
const location = useLocation()
const menuConfigs = generateMenuConfig(location)
if (location.pathname === Routes.INVITE) return null
return <Sidebar {...menuConfigs} location={location} />
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,17 @@ exports[`Router should match a snapshot 1`] = `
path="/404"
render={[Function]}
/>
<Component
path="/invite"
showMenu={false}
>
<Component
component={
Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
}
<Route
component={
Object {
"$$typeof": Symbol(react.lazy),
"_ctor": [Function],
"_result": null,
"_status": -1,
}
path="/"
/>
</Component>
}
path="/invite"
/>
<Component
path="/"
>
Expand Down
5 changes: 1 addition & 4 deletions packages/developer-portal/src/core/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ const Router = () => {
<Route path={Routes.REGISTER} render={() => <Register />} />
<Route path={Routes.REGISTER_CONFIRM} exact component={RegisterConfirm} />
<Route path={Routes.FOUR_O_FOUR} exact render={() => <Info infoType="404" />} />

<PrivateRouteWrapper path={Routes.INVITE} showMenu={false}>
<PrivateRoute path="/" component={Invite} />
</PrivateRouteWrapper>
<Route path={Routes.INVITE} component={Invite} />

<PrivateRouteWrapper path="/">
<Switch>
Expand Down

0 comments on commit 1b4950c

Please sign in to comment.