Skip to content

Commit 19d07bd

Browse files
committed
fix(neuron-ui): fix the missing of password request dialog
1 parent b3e3d0e commit 19d07bd

1 file changed

Lines changed: 28 additions & 19 deletions

File tree

  • packages/neuron-ui/src/containers/Main

packages/neuron-ui/src/containers/Main/index.tsx

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ export const mainContents: CustomRouter.Route[] = [
102102
exact: false,
103103
comp: ImportKeystore,
104104
},
105-
{
106-
name: `PasswordRequest`,
107-
path: '/',
108-
exact: false,
109-
comp: PasswordRequest,
110-
},
105+
// {
106+
// name: `PasswordRequest`,
107+
// path: '/',
108+
// exact: false,
109+
// comp: PasswordRequest,
110+
// },
111111
{
112112
name: `NervosDAO`,
113113
path: Routes.NervosDAO,
@@ -157,19 +157,28 @@ const MainContent = ({
157157
})
158158

159159
return (
160-
<Switch>
161-
<Redirect from={Routes.SettingsGeneral} to={Routes.SettingsWallets} />
162-
{mainContents.map(container => (
163-
<Route
164-
exact={container.exact}
165-
path={`${container.path}${container.params || ''}`}
166-
key={container.name}
167-
render={routerProps => {
168-
return <container.comp {...routerProps} {...neuronWalletState} dispatch={dispatch} />
169-
}}
170-
/>
171-
))}
172-
</Switch>
160+
<>
161+
<Route
162+
path="/"
163+
key="PasswordRequest"
164+
render={routerProps => {
165+
return <PasswordRequest {...routerProps} {...neuronWalletState} dispatch={dispatch} />
166+
}}
167+
/>
168+
<Switch>
169+
<Redirect from={Routes.SettingsGeneral} to={Routes.SettingsWallets} />
170+
{mainContents.map(container => (
171+
<Route
172+
exact={container.exact}
173+
path={`${container.path}${container.params || ''}`}
174+
key={container.name}
175+
render={routerProps => {
176+
return <container.comp {...routerProps} {...neuronWalletState} dispatch={dispatch} />
177+
}}
178+
/>
179+
))}
180+
</Switch>
181+
</>
173182
)
174183
}
175184

0 commit comments

Comments
 (0)