Skip to content

Commit 5822462

Browse files
committed
code refactoring of routing
1 parent db9e722 commit 5822462

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"homepage": "/dashboard",
66
"dependencies": {
7-
"@devtron-labs/devtron-fe-common-lib": "0.0.51-beta-3",
7+
"@devtron-labs/devtron-fe-common-lib": "0.0.51-beta-3-1",
88
"@rjsf/core": "^5.13.3",
99
"@rjsf/utils": "^5.13.3",
1010
"@rjsf/validator-ajv8": "^5.13.3",

src/App.tsx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -245,26 +245,22 @@ export default function App() {
245245
) : (
246246
<ErrorBoundary>
247247
<BreadcrumbStore>
248-
{isDirectApprovalNotification ? (
249-
<Switch>
250-
{GenericDirectApprovalModal && (
251-
<Route exact path={`/${approvalType?.toLocaleLowerCase()}/approve`}>
252-
<GenericDirectApprovalModal
253-
approvalType={approvalType}
254-
approvalToken={approvalToken}
255-
/>
256-
</Route>
257-
)}
258-
</Switch>
259-
) : (
260248
<Switch>
249+
{isDirectApprovalNotification && GenericDirectApprovalModal && (
250+
<Route exact path={`/${approvalType?.toLocaleLowerCase()}/approve`}>
251+
<GenericDirectApprovalModal
252+
approvalType={approvalType}
253+
approvalToken={approvalToken}
254+
/>
255+
</Route>
256+
)}
261257
{!window._env_.K8S_CLIENT && <Route path={`/login`} component={Login} />}
262258
<Route path="/" render={() => <NavigationRoutes />} />
263259
<Redirect
264260
to={window._env_.K8S_CLIENT ? '/' : `${URLS.LOGIN_SSO}${location.search}`}
265261
/>
266262
</Switch>
267-
)}
263+
{/* )} */}
268264
<div id="full-screen-modal"></div>
269265
<div id="visible-modal"></div>
270266
<div id="visible-modal-2"></div>

0 commit comments

Comments
 (0)