Skip to content

Commit

Permalink
fix(neuron-ui): fix the missing of password request dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Nov 14, 2019
1 parent b3e3d0e commit 19d07bd
Showing 1 changed file with 28 additions and 19 deletions.
47 changes: 28 additions & 19 deletions packages/neuron-ui/src/containers/Main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ export const mainContents: CustomRouter.Route[] = [
exact: false,
comp: ImportKeystore,
},
{
name: `PasswordRequest`,
path: '/',
exact: false,
comp: PasswordRequest,
},
// {
// name: `PasswordRequest`,
// path: '/',
// exact: false,
// comp: PasswordRequest,
// },
{
name: `NervosDAO`,
path: Routes.NervosDAO,
Expand Down Expand Up @@ -157,19 +157,28 @@ const MainContent = ({
})

return (
<Switch>
<Redirect from={Routes.SettingsGeneral} to={Routes.SettingsWallets} />
{mainContents.map(container => (
<Route
exact={container.exact}
path={`${container.path}${container.params || ''}`}
key={container.name}
render={routerProps => {
return <container.comp {...routerProps} {...neuronWalletState} dispatch={dispatch} />
}}
/>
))}
</Switch>
<>
<Route
path="/"
key="PasswordRequest"
render={routerProps => {
return <PasswordRequest {...routerProps} {...neuronWalletState} dispatch={dispatch} />
}}
/>
<Switch>
<Redirect from={Routes.SettingsGeneral} to={Routes.SettingsWallets} />
{mainContents.map(container => (
<Route
exact={container.exact}
path={`${container.path}${container.params || ''}`}
key={container.name}
render={routerProps => {
return <container.comp {...routerProps} {...neuronWalletState} dispatch={dispatch} />
}}
/>
))}
</Switch>
</>
)
}

Expand Down

0 comments on commit 19d07bd

Please sign in to comment.