@@ -17,7 +17,6 @@ import {
17
17
ToastBody ,
18
18
ToastBody3 as UpdateToast ,
19
19
ErrorBoundary ,
20
- importComponentFromFELibrary ,
21
20
} from './components/common'
22
21
import { showError , BreadcrumbStore , Reload , DevtronProgressing } from '@devtron-labs/devtron-fe-common-lib'
23
22
import * as serviceWorker from './serviceWorker'
@@ -26,11 +25,7 @@ import { validateToken } from './services/service'
26
25
27
26
const NavigationRoutes = lazy ( ( ) => import ( './components/common/navigation/NavigationRoutes' ) )
28
27
const Login = lazy ( ( ) => import ( './components/login/Login' ) )
29
- const GenericDirectApprovalModal = importComponentFromFELibrary ( 'GenericDirectApprovalModal' )
30
- export enum APPROVAL_MODAL_TYPE {
31
- CONFIG = 'CONFIG' ,
32
- IMAGE = 'IMAGE' ,
33
- }
28
+
34
29
toast . configure ( {
35
30
autoClose : 3000 ,
36
31
hideProgressBar : true ,
@@ -92,9 +87,6 @@ export default function App() {
92
87
useEffect ( ( ) => {
93
88
async function validation ( ) {
94
89
try {
95
- if ( location . pathname . includes ( 'approval' ) ) {
96
- return
97
- }
98
90
await validateToken ( )
99
91
defaultRedirection ( )
100
92
} catch ( err : any ) {
@@ -114,7 +106,7 @@ export default function App() {
114
106
}
115
107
}
116
108
// If not K8S_CLIENT then validateToken otherwise directly redirect
117
- if ( ! window . _env_ . K8S_CLIENT ) {
109
+ if ( ! window . _env_ . K8S_CLIENT ) {
118
110
validation ( )
119
111
} else {
120
112
setValidating ( false )
@@ -215,7 +207,7 @@ export default function App() {
215
207
< Suspense fallback = { null } >
216
208
{ validating ? (
217
209
< div className = "full-height-width" >
218
- < DevtronProgressing parentClasses = "h-100 flex bcn-0" classes = "icon-dim-80" />
210
+ < DevtronProgressing parentClasses = "h-100 flex bcn-0" classes = "icon-dim-80" />
219
211
</ div >
220
212
) : (
221
213
< >
@@ -228,7 +220,6 @@ export default function App() {
228
220
< BreadcrumbStore >
229
221
< Switch >
230
222
{ ! window . _env_ . K8S_CLIENT && < Route path = { `/login` } component = { Login } /> }
231
- < Route path = { `/approval` } render = { ( ) => GenericDirectApprovalModal && < GenericDirectApprovalModal approvalType = { APPROVAL_MODAL_TYPE . IMAGE } /> } />
232
223
< Route path = "/" render = { ( ) => < NavigationRoutes /> } />
233
224
< Redirect
234
225
to = { window . _env_ . K8S_CLIENT ? '/' : `${ URLS . LOGIN_SSO } ${ location . search } ` }
0 commit comments