Skip to content

Commit

Permalink
fix: #2579 invite flow broken on prod
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcvay committed Sep 4, 2020
1 parent fce1e77 commit 4172bf8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 28 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
9 changes: 0 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5274,15 +5274,6 @@
jsonwebtoken "^8.5.1"
snyk "^1.335.0"

"@reapit/[email protected]":
version "1.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/@reapit/connect-session/-/connect-session-1.0.0-alpha.1.tgz#4c06af14318a8dd355d6a5a233f3f1db0bc26402"
integrity sha512-v07IY2skFIz/PZvNsd5ZucVyaEunWMigt/QIBELZdYC4zcphFCQJ4d1PuqYnTqkoc+dxWjXyLV4NVL2qzu/XtQ==
dependencies:
isomorphic-fetch "^2.2.1"
jsonwebtoken "^8.5.1"
snyk "^1.335.0"

"@reapit/[email protected]", "@reapit/connect-session@^1.0.0-alpha.1", "@reapit/connect-session@^1.0.0-alpha.2", "@reapit/connect-session@^1.0.0-alpha.3":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@reapit/connect-session/-/connect-session-1.0.1.tgz#a8feaf97b10a8f53cf8b1c012353c77620823dd8"
Expand Down

0 comments on commit 4172bf8

Please sign in to comment.